Details
-
Task
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
-
None
Description
We have information on the various replica set states:
http://docs.mongodb.org/manual/reference/replica-status/
As an extension of this, we should add information on whether or not they vote in each of these respective states. It should also be added to: http://docs.mongodb.org/manual/faq/replica-sets/#which-members-of-a-replica-set-vote-in-elections
The following conditions must be met in order for a member to be able to vote in an election:
1. Member must be in the current replica set configuration
2. Member must have a current config version
3. The member who triggered the election can be found in the config
Also, there are three conditions that prevent a member from voting in an election:
4. If this member is a PRIMARY and it's ahead of the member who triggered the election, do not vote
5. If there is a PRIMARY that this member can see and it's ahead of the member who triggered the election, do not vote
6. If the member triggering the election is a lower priority than someone else in the electable set, do not vote
Based on this, we have the following outcomes for the different replica set states:
STARTUP - The member hasn't parsed the replica set config yet, so it can't vote due to #2 above
STARTUP2 - The member is still parsing the config, and the member hasn't yet established who the Primary is, so it won't vote. That being, a member is usually only in STARTUP2 as a brief interim before going into state SECONDARY or RECOVERING (if it has any catching up to the oplog to do).
ROLLBACK - The member will vote.
PRIMARY, SECONDARY, RECOVERING - All vote
Members in states FATAL, SHUNNED, UNKNOWN, and DOWN aren't members of the replica set, so they won't vote.
Attachments
Issue Links
- is related to
-
DOCS-13044 Eligibility to vote unclear/misleading on Replica States page
-
- Closed
-