-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
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.
- is related to
-
SERVER-89950 Remove serverStatus call from ReplSetTest.startSet when restart=true
- Closed