replSetStepDown command in txn_two_phase_commit_failover.js should not timeout

XMLWordPrintableJSON

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

      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 (Inactive)
            Reporter:
            Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: