-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
Fully Compatible
-
v3.4, v3.2
-
Repl 2016-12-12, Repl 2017-01-23
When the shutdown command is run against the primary of a replica set, it first tries to step down. The shutdown command takes a 'timeoutSecs' argument to control how long it waits for secondaries to catch up after it has blocked new writes before it aborts the stepdown and shutdown attempt. This argument, however, defaults to 0, so unless a majority of secondaries are fully caught up to the primary at the moment that the shutdown command is issued then it will fail - which if there are a steady stream of writes happening will likely always be the case. The replSetStepDown command has similar behavior, but its equivalent argument - 'secondaryCatchUpPeriodSecs' - defaults to 10 seconds. We should change shutdown to match the behavior of stepdown so that it's actually possible to use the default behavior to shut down a primary while it is taking writes.
- is related to
-
SERVER-27015 db.shutdownServer doesn't find electable secondaries
- Closed
- related to
-
SERVER-27461 Retry connecting to shut down primary until failure in shutdown_primary.js
- Closed
-
SERVER-26747 replSetStepDown should wait for last write to commit
- Closed