[SERVER-48207] Vote requester cannot be cancelled if it has finished Created: 14/May/20  Updated: 29/Oct/23  Resolved: 14/May/20

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.4.0-rc7, 4.7.0

Type: Bug Priority: Major - P3
Reporter: Siyuan Zhou Assignee: Siyuan Zhou
Resolution: Fixed Votes: 0
Labels: safe-reconfig-related
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:
v4.4
Sprint: Repl 2020-05-18
Participants:
Linked BF Score: 28

 Description   

Cancelling vote requester as part of election cancellation assumes the election will not continue. However if the vote requester has already collected sufficient votes by the time cancel() is called, cancel() will be a no-op since the finish event has been signaled. As a result, the election will continue because nothing prevents the finish event to trigger the scheduled next step.

We need to coordinate cancelling and winning election under the replication mutex so that the cancelled election cannot continue.



 Comments   
Comment by Githook User [ 14/May/20 ]

Author:

{'name': 'William Schultz', 'email': 'william.schultz@mongodb.com', 'username': 'will62794'}

Message: SERVER-47949 Don't fetch or install a newer config via heartbeat while in drain mode

(cherry picked from commit 2546fe1c22b0777ca68e604376900ea11f10ee3a)

SERVER-48102 Update heartbeat state on primary even if heartbeat response includes a new config

(cherry picked from commit 74cc45677605baf25cd57caa497e254883e88567)

SERVER-48207 Vote requester should not succeed once cancelled.

(cherry picked from commit 852d7eb6c7e7b34a78bd6f69ec8c1a65fa179c9e)
Branch: v4.4
https://github.com/mongodb/mongo/commit/e3ebc2fc9e6a3c3e2702ba1c68b264540d7e954c

Comment by Githook User [ 14/May/20 ]

Author:

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

Message: SERVER-48207 Vote requester should not succeed once cancelled.
Branch: master
https://github.com/mongodb/mongo/commit/852d7eb6c7e7b34a78bd6f69ec8c1a65fa179c9e

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