-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Sharding
-
Cluster Scalability
-
ALL
-
0
TheĀ _continuousPrimaryStepdownFn function is part of a background thread that will continually stepdown the primary. It keeps a reference of the latest primary in memory and updates each time after stepping down the old primary.
This setup means that if there was an election after it decided to update what it thinks the primary is, it will have an old reference of what the primary is. Hence, next time it attempts to stepdown the primary it will have a network error.
In order to solve this we should wrap the command execution below in a trycatch. If its a network then swallow the exception, and otherwise rethrow the error. To be handled by the higher up trycatch.
When swallowing the exception make sure to print out its ocurrence.
assert.commandWorkedOrFailedWithCode(
primary.adminCommand(
{replSetStepDown: options.stepdownDurationSecs, force: true}),
[ErrorCodes.NotWritablePrimary, ErrorCodes.ConflictingOperationInProgress]);
- is related to
-
SERVER-59891 Replace the coverage from sharding_continuous_config_stepdown.yml and then delete the test suite
- Backlog