Operational Defect Database

BugZero found this defect 2319 days ago.

MongoDB | 448925

[SERVER-31671] Cancel running elections if the term changes after writing my last vote

Last update date:

10/30/2023

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

3.4.14

3.6.0-rc4

Description:

Info

In the real election, the term of dry run election should be used rather than the term in topology coordinator because the latter can be updated if another node is also running election. It should be the same one we pass into _onVoteRequestComplete(). Alternatively, we can double check the term is the still same before the real election.

Top User Comments

xgen-internal-githook commented on Sat, 24 Feb 2018 00:03:58 +0000: Author: {'email': 'siyuan.zhou@mongodb.com', 'name': 'Siyuan Zhou', 'username': 'visualzhou'} Message: SERVER-31671 Cancel running elections if the term changes after writing my last vote (cherry picked from commit c8fbc9a23152d707541a5c03c6af0eedb9a83bf9) Branch: v3.4 https://github.com/mongodb/mongo/commit/5b67d13f3a5c44ea677de10bea9c871a246ca619 xgen-internal-githook commented on Tue, 7 Nov 2017 21:41:48 +0000: Author: {'name': 'Siyuan Zhou', 'username': 'visualzhou', 'email': 'siyuan.zhou@mongodb.com'} Message: SERVER-31671 Cancel running elections if the term changes after writing my last vote Branch: master https://github.com/mongodb/mongo/commit/c8fbc9a23152d707541a5c03c6af0eedb9a83bf9 siyuan.zhou@10gen.com commented on Mon, 23 Oct 2017 17:33:27 +0000: It's more of a bug in my opinion, but not a harmful one according to how we handle term change. The candidate may run the real election in a higher term (the term used by VoteRequestor) but want to become primary in a lower term (the term passed in _onVoteRequestComplete). We have a safe guard in _onVoteRequestComplete to check the term change, which masked this issue. schwerin commented on Sun, 22 Oct 2017 20:11:25 +0000: This is a performance optimization, based on the assumption that the term change indicates another candidate has arrived, and that said candidate is likely to win?

Additional Resources / Links

Share:

BugZero Risk Score

Coming soon

Status

Closed

Have you been affected by this bug?

cost-cta-background

Do you know how much operational outages are costing you?

Understand the cost to your business and how BugZero can help you reduce those costs.

Discussion

Login to read and write comments.

Have you ever...

had your data corrupted from a

VMware

bug?

Search:

...