[SERVER-79734] ReplSetTest.startSet should by default step up an electable node when restarting cluster Created: 04/Aug/23  Updated: 05/Feb/24

Status: In Progress
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Kaitlin Mahar Assignee: Kaitlin Mahar
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Sprint: Repl 2024-02-05, Repl 2024-02-19
Participants:
Linked BF Score: 5

 Description   

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.


Generated at Thu Feb 08 06:41:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.