[SERVER-59212] Make sure node stepped down before waiting for catchup takeover in catchup_takeover_with_higher_config.js Created: 10/Aug/21  Updated: 29/Oct/23  Resolved: 10/Aug/21

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 5.1 Required
Fix Version/s: 5.0.3, 4.4.9, 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Wenbin Zhu Assignee: Wenbin Zhu
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.0, v4.4
Sprint: Repl 2021-08-23
Participants:
Linked BF Score: 150

 Description   

There is a race in catchup_takeover_with_higher_config.js. When waiting for node1 to catchup takeover node2, we check that all nodes see node1 as primary, however it's possible that node1 has not finished stepping down (due to node2 stepup) before we wait, so it remains primary state and the wait condition is trivially satisfied, meaning that the catchup takeover has not happened yet after the wait. Later after the failpoint on node2 is lifted, node2 successfully becomes primary (because node1 didn't do catchup takeover) and stays as primary till the end, causing this line to hang forever.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 11/Aug/21 ]

Author:

{'name': 'Wenbin Zhu', 'email': 'wenbin.zhu@mongodb.com', 'username': 'WenbinZhu'}

Message: SERVER-59212 Make sure node stepped down before waiting for catchup takeover in catchup_takeover_with_higher_config.js

(cherry picked from commit 0698d8274f591725f3ddf0f8dcdf4c0d5f130770)
Branch: v5.0
https://github.com/mongodb/mongo/commit/20758c92f24804272cd79bc5610252e7f8c31d9e

Comment by Githook User [ 11/Aug/21 ]

Author:

{'name': 'Wenbin Zhu', 'email': 'wenbin.zhu@mongodb.com', 'username': 'WenbinZhu'}

Message: SERVER-59212 Make sure node stepped down before waiting for catchup takeover in catchup_takeover_with_higher_config.js

(cherry picked from commit 0698d8274f591725f3ddf0f8dcdf4c0d5f130770)
Branch: v4.4
https://github.com/mongodb/mongo/commit/2074f5e8cd4b734573c20788dc488fb1fcf0c916

Comment by Githook User [ 10/Aug/21 ]

Author:

{'name': 'Wenbin Zhu', 'email': 'wenbin.zhu@mongodb.com', 'username': 'WenbinZhu'}

Message: SERVER-59212 Make sure node stepped down before waiting for catchup takeover in catchup_takeover_with_higher_config.js
Branch: master
https://github.com/mongodb/mongo/commit/0698d8274f591725f3ddf0f8dcdf4c0d5f130770

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