Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-45551

BF Day: delayMessagesFrom() doesn't delay messages

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 4.3.2
    • Fix Version/s: 4.9.0
    • Component/s: Testing Infrastructure
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      You can prove it with the following simple JS script:

      var st = new ShardingTest({shards: {rs0: {nodes: 2}}, mongos: 1, config: 1, useBridge: true});
      // Delay messages Primary -> Secondary (12000 ms)
      st.rs0.getSecondary().delayMessagesFrom(st.rs0.getPrimary(),12000);
      // Insert using both the replica nodes
      assert.commandFailed(st.s0.getCollection('testDB.cll').insert({test: 5}, {writeConcern: {w: 2, wtimeout: 4000}}));

      The last insert works but it shouldn't.

      Show
      You can prove it with the following simple JS script: var st = new ShardingTest({shards: {rs0: {nodes: 2}}, mongos: 1, config: 1, useBridge: true}); // Delay messages Primary -> Secondary (12000 ms) st.rs0.getSecondary().delayMessagesFrom(st.rs0.getPrimary(),12000); // Insert using both the replica nodes assert.commandFailed(st.s0.getCollection('testDB.cll').insert({test: 5}, {writeConcern: {w: 2, wtimeout: 4000}})); The last insert works but it shouldn't.
    • Sprint:
      STM 2020-10-05, STM 2020-10-19
    • Linked BF Score:
      31
    • Story Points:
      0

      Description

      I've noticed that delayMessagesFrom() is actually not delaying messages between replica node of the same shard.

      This function is currently used by just one test and the code of the function is 4 years old now.

        Attachments

          Activity

            People

            Assignee:
            richard.samuels Richard Samuels
            Reporter:
            tommaso.tocci Tommaso Tocci
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: