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

ReplSetTest.startSet should by default step up an electable node when restarting cluster

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Repl 2024-02-05, Repl 2024-02-19, Repl 2024-03-04, Repl 2024-03-18
    • 13

      Currently, any test that stops and then restarts a replica set wastes 10 seconds (default election timeout) before electing a new primary after restart. We should update ReplSetTest.start so that when the 'restart' option is true we proactively try to step up the first electable node we see in the config without waiting.

      If there are any tests with no electable node in the config, we could either allow them to disable this behavior with an option, or we could just not elect a node and consider this a best-effort behavior.

      Note this delay isn't a problem when we first start up a set via ReplSetTest because initiate() calls initiateWithNodeZeroAsPrimary() which will step up the first node if it isn't the primary already. But we don't call into this same logic on restart.

            Assignee:
            kaitlin.mahar@mongodb.com Kaitlin Mahar
            Reporter:
            kaitlin.mahar@mongodb.com Kaitlin Mahar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: