-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
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});