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

Skip dry-run election during election handoff

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.9, 4.0.3, 4.1.4
    • Affects Version/s: None
    • Component/s: Replication
    • Labels:
      None
    • Fully Compatible
    • v4.0, v3.6
    • Repl 2018-08-27, Repl 2018-09-10, Repl 2018-09-24

      With the new election handoff machinery, when a primary is sent replSetStepDown, the last thing it does as part of stepDown is send a replSetStepUp command to a node it believes to be best equipped to take over as the new primary. The stepUp command makes the new node call for an election, going through the normal election path which includes a dry-run election. Dry run elections aren't required for correctness, they are an optimization to limit unnecessary term changes due to failed elections. But since we already believe this node has a pretty good chance to win, and because the primary is stepping down so there's going to be a term change anyway, we could skip the dry run on the new primary candidate node and still have a good chance to win. This would reduce failover time in the common case for planned failover, at the risk of inducing extra unnecessary elections in the degenerate case.

            Assignee:
            vesselina.ratcheva@mongodb.com Vesselina Ratcheva (Inactive)
            Reporter:
            spencer@mongodb.com Spencer Brody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: