[SERVER-35437] Wait for secondary state after stepdown command in multi_rs.js Created: 06/Jun/18  Updated: 29/Oct/23  Resolved: 08/Jun/18

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 3.4.15
Fix Version/s: 3.4.16, 4.2.6, 3.6.18, 4.0.17

Type: Task Priority: Major - P3
Reporter: Siyuan Zhou Assignee: Backlog - Replication Team
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Assigned Teams:
Replication
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.2, v4.0, v3.6
Sprint: Repl 2018-06-18
Participants:
Linked BF Score: 19

 Description   

SERVER-31265 fixes the race of closing connection for new connections in 3.6 and beyond, but wasn't backported to 3.4. That causes the new connection for "ismaster" to be closed after sending stepdown command in multi_rs.js on 3.4. A workaround is to wait for "secondary" state after sending stepdown command but before calling "reconnect" which sends an "ismaster".



 Comments   
Comment by Githook User [ 02/Apr/20 ]

Author:

{'name': 'Siyuan Zhou', 'email': 'visualzhou@gmail.com', 'username': 'visualzhou'}

Message: SERVER-35437 Wait for secondary state after stepdown command in multi_rs.js
Branch: v4.2
https://github.com/mongodb/mongo/commit/d3bc3ed51172956dd2c810be014648d89a4c24dd

Comment by Githook User [ 10/Feb/20 ]

Author:

{'name': 'Siyuan Zhou', 'username': 'visualzhou', 'email': 'visualzhou@gmail.com'}

Message: SERVER-35437 Wait for secondary state after stepdown command in multi_rs.js
Branch: v4.0
https://github.com/mongodb/mongo/commit/4433187014909dc7e83849d7f32c082042b1b2bf

Comment by Githook User [ 10/Feb/20 ]

Author:

{'username': 'visualzhou', 'name': 'Siyuan Zhou', 'email': 'visualzhou@gmail.com'}

Message: SERVER-35437 Wait for secondary state after stepdown command in multi_rs.js
Branch: v3.6
https://github.com/mongodb/mongo/commit/e4215a2afa67111688248989bcb0b515a39d0125

Comment by Siyuan Zhou [ 10/Feb/20 ]

tess.avitabile, this should also be implemented on master since this is to work around an issue on 3.2 and 3.4, but we test major version upgrade starting from 3.2. I requested backport to 4.2 as well.

Comment by Siyuan Zhou [ 17/Mar/19 ]

We also need to port the patch of multi_rs.js to master.

Comment by Githook User [ 08/Jun/18 ]

Author:

{'username': 'visualzhou', 'name': 'Siyuan Zhou', 'email': 'siyuan.zhou@mongodb.com'}

Message: SERVER-35437 Wait for secondary state after stepdown command in multi_rs.js
Branch: v3.4
https://github.com/mongodb/mongo/commit/72c79c4383a80268d82cc9cb3059ffc99bdf9b34

Generated at Thu Feb 08 04:39:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.