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

replSetStepDown command in txn_two_phase_commit_failover.js should not timeout

    • Fully Compatible
    • v5.2, v5.1, v5.0, v4.4, v4.2
    • Sharding 2021-12-27
    • 22
    • 2

      This test is more susceptible to replSetStepDown failing to acquire the ReplicationStateTransition lock because it sets a low (one second) stepDownSecs.

      We should increase the stepDownSecs to prevent this issue, keeping in mind not to set it too high, since this test calls replSetStepDown many times and needs to wait for the same node to transition back to primary.

      Another solution would be to manually step up a primary. Proposed by max.hirschhorn  here. Like this:

      assert.commandWorked(
          coordPrimary.adminCommand({replSetStepDown: ReplSetTest.kForeverSecs, force: true}));
      
      assert.commandWorked(coordPrimary.adminCommand({replSetFreeze: 0}));
      assert.commandWorked(coordPrimary.adminCommand({replSetStepUp: 1}));
      // Or perhaps use the helper, coordinatorReplSetTest.stepUp(coordPrimary, {awaitReplicationBeforeStepUp: false});
      

            Assignee:
            luis.osta@mongodb.com Luis Osta (Inactive)
            Reporter:
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: