[SERVER-48256] Election cannot be canceled when writing its last vote Created: 15/May/20  Updated: 29/Oct/23  Resolved: 13/Jul/20

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.7.0

Type: Bug Priority: Major - P3
Reporter: Siyuan Zhou Assignee: Jason Chan
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-46850 Stepup due to election handoff may no... Closed
Related
is related to SERVER-47612 Elections not robust in remove_newly_... Closed
is related to SERVER-48257 Reject heartbeat reconfig when runnin... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2020-06-29, Repl 2020-07-13, Repl 2020-07-27
Participants:
Linked BF Score: 23

 Description   

Election cancelation calls VoterRequester::cancel() to stop the running election. However, when the node has finished election dry run and is writing the last vote, calling cancel() on the dry run VoterRequester won't stop the real election since real election resets the VoterRequester.

We could have the real run to check the result of the previous VoteRequester, but election handoff skips the dry run, so canceling the election will invariant as in SERVER-46850. Using VoteRequester to store the cancelled state as in SERVER-48207 isn't reliable in that case. We need to represent the canceled state at a higher level.



 Comments   
Comment by Githook User [ 13/Jul/20 ]

Author:

{'name': 'Jason Chan', 'email': 'jason.chan@mongodb.com', 'username': 'jasonjhchan'}

Message: SERVER-48256 Add ElectionState object to manage vote requester logic
Branch: master
https://github.com/mongodb/mongo/commit/c31cac2855eb84c9bc824852773265c8e0b60a4e

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