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

Skip dry-run election during election handoff

    XMLWordPrintable

    Details

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

      Description

      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.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: