[SERVER-45149] replSetStepDown command in txn_two_phase_commit_failover.js should not timeout Created: 13/Dec/19  Updated: 29/Oct/23  Resolved: 09/Dec/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 5.3.0, 5.1.2, 5.0.6, 4.4.11, 5.2.0-rc1, 4.2.19

Type: Task Priority: Major - P3
Reporter: Esha Maharishi (Inactive) Assignee: Luis Osta (Inactive)
Resolution: Fixed Votes: 0
Labels: sharding-nyc-subteam1, sharding-wfbf-sprint
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.2, v5.1, v5.0, v4.4, v4.2
Sprint: Sharding 2021-12-27
Participants:
Linked BF Score: 22
Story Points: 2

 Description   

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});



 Comments   
Comment by Githook User [ 10/Dec/21 ]

Author:

{'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}

Message: SERVER-45149 Add replset commands to prevent replsetDown timeout

(cherry picked from commit fb20ae3c42cc5724d74baaeab089db4e3a650d2c)
Branch: v4.2
https://github.com/mongodb/mongo/commit/dec388494b652488259072cf61fd987af3fa8470

Comment by Githook User [ 10/Dec/21 ]

Author:

{'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}

Message: SERVER-45149 Add replset commands to prevent replsetDown timeout

(cherry picked from commit fb20ae3c42cc5724d74baaeab089db4e3a650d2c)
Branch: v4.4
https://github.com/mongodb/mongo/commit/f33a7c8f2f96ca1b0f6601104fecd89ce861c094

Comment by Githook User [ 10/Dec/21 ]

Author:

{'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}

Message: SERVER-45149 Add replset commands to prevent replsetDown timeout

(cherry picked from commit fb20ae3c42cc5724d74baaeab089db4e3a650d2c)
Branch: v5.2
https://github.com/mongodb/mongo/commit/5c95da6983591231793dd12b92fe8fdba2b12894

Comment by Githook User [ 10/Dec/21 ]

Author:

{'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}

Message: SERVER-45149 Add replset commands to prevent replsetDown timeout

(cherry picked from commit fb20ae3c42cc5724d74baaeab089db4e3a650d2c)
Branch: v5.0
https://github.com/mongodb/mongo/commit/68aa95b1062bfd64b772836747304d9e3eca1476

Comment by Githook User [ 10/Dec/21 ]

Author:

{'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}

Message: SERVER-45149 Add replset commands to prevent replsetDown timeout

(cherry picked from commit fb20ae3c42cc5724d74baaeab089db4e3a650d2c)
Branch: v5.1
https://github.com/mongodb/mongo/commit/4e85d2e2439182122ffdb4f60f33f9e302e83134

Comment by Githook User [ 09/Dec/21 ]

Author:

{'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}

Message: SERVER-45149 Add replset commands to prevent replsetDown timeout
Branch: master
https://github.com/mongodb/mongo/commit/fb20ae3c42cc5724d74baaeab089db4e3a650d2c

Generated at Thu Feb 08 05:08:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.