[SERVER-11032] Do not veto if "primary" is the node trying to be elected Created: 03/Oct/13  Updated: 11/Jul/16  Resolved: 04/Oct/13

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 2.4.6
Fix Version/s: 2.4.7, 2.5.3

Type: Bug Priority: Minor - P4
Reporter: Scott Hernandez (Inactive) Assignee: Scott Hernandez (Inactive)
Resolution: Done Votes: 0
Labels: elections
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   
Issue Status as of October 22nd, 2013

ISSUE SUMMARY
Re-election of a primary can be delayed because of a veto from another member of the replica set.

USER IMPACT
This issue can manifest if a replica set election is triggered and a member has not seen that the (old) primary has already stepped down. This will occur most frequently when there is a replica set reconfiguration event combined with either network latency or a node is overloaded. This fix shortens the time it takes to re-elect the primary; it would eventually get elected when the stepdown state is processed and it stops vetoing.

It is present in all versions of MongoDB prior to and including v2.4.6.

SOLUTION
Don't veto former primary from re-electing itself.

WORKAROUNDS
None.

PATCHES
Production release v2.4.7 contains the fix for this issue, and production release v2.6.0 will contain the fix as well.

Original Description

This can happen if the member has a stale view of the world believing that there is a primary.
Example log:

not electing self, bar:27017 would veto with 'foo:27017 is trying to elect itself but foo:27017 is already primary and more up-to-date'



 Comments   
Comment by auto [ 04/Oct/13 ]

Author:

{u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}

Message: SERVER-11032: Do not veto if primary is the node trying to be elected
Branch: v2.4
https://github.com/mongodb/mongo/commit/c53182403aae0eae655c34b848a61de92fd92566

Comment by auto [ 04/Oct/13 ]

Author:

{u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}

Message: SERVER-11032: Do not veto if primary is the node trying to be elected
Branch: master
https://github.com/mongodb/mongo/commit/ddadab1bbd8739df2c2a91b5f88c254d7e14380d

Generated at Thu Feb 08 03:24:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.