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

BF Day: delayMessagesFrom() doesn't delay messages

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0
    • Affects Version/s: 4.3.2
    • Component/s: Testing Infrastructure
    • Labels:
      None
    • Fully Compatible
    • ALL
    • 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.
    • STM 2020-10-05, STM 2020-10-19
    • 31
    • 0

      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.

            Assignee:
            richard.samuels@mongodb.com Richard Samuels (Inactive)
            Reporter:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: