Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-32237

Nodes that cannot become primary must neither update progress nor vote "aye"

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • Labels:
      None
    • Replication
    • ALL

      Consider a 3 node replica set with a primary, a secondary, and a voting-unelectable node (rollback, initial sync, or recovering). Consider the case where all nodes are replicating from the primary. The primary takes writes at times T1, T2, and T3 with w:majority. The secondary replicates the write at T1, and the voting-unelectable node replicates the writes at T1 and T2. The primary will see that T1 and T2 are both replicated to a majority and it will commit them and acknowledge them to the client.

      Now, if the primary crashes, consider what occurs. The secondary is behind the voting-unelectable node, so the voting-unelectable node won't vote for it (and can't because then we'd lose the majority-committed write), but the other node is unelectable. We will thus not be able to elect a primary. If the unelectable node is also inconsistent, this is even worse because there is no way to make it electable.Thus we should not update our progress if we're unelectable.

      The node should not vote "aye" either. While voting "aye" will not cause us to lose committed writes (assuming we do not update progress as above), it will cause the unelectable node to vote for nodes that cannot commit writes, since it cannot be part of a majority to help commit writes.

            Assignee:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            judah.schvimer@mongodb.com Judah Schvimer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: