Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-1209

clarify when a replica set member can vote

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 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

        Activity

          People

            kay.kim@mongodb.com Kay Kim (Inactive)
            barrie Barrie Segal
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              10 years, 34 weeks, 2 days ago