[DOCS-11774] [Server] Specify correct shutdown command behavior Created: 06/Jun/18  Updated: 13/Nov/23  Resolved: 18/Jul/23

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: 5.0.0, 6.0.0, 6.3, 7.0.0, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Task Priority: Major - P3
Reporter: Eric Milkie Assignee: Jason Price
Resolution: Done Votes: 0
Labels: quick-win, reopened, server-docs-bug-bash
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

https://docs.mongodb.com/manual/reference/command/shutdown/


Participants:
Days since reply: 29 weeks, 6 days ago

 Description   

The documentation for shutdown states that the command returns an error if no secondaries are caught up to within 10 seconds of lag.

A while ago, we changed the behavior to match what the stepDown command does, with passed parameters of "10 seconds" for the wait time and "120 seconds" for the freeze time.



 Comments   
Comment by Eric Milkie [ 13/Jul/23 ]

I looked into exactly how the code behaves today (7.0 version). I found that the help text for the mongod command is accurate, and we can crib the docs page off its text:
"Shuts down the database. Must be run against the admin database and either (1) run "
"from localhost or (2) run while authenticated with the shutdown privilege. If the "
"node is the primary of a replica set, waits up to 'timeoutSecs' for an electable "
"node to be caught up before stepping down. If 'force' is false and no electable "
"node was able to catch up, does not shut down. If the node is in state SECONDARY "
"after the attempted stepdown, any remaining time in 'timeoutSecs' is used for "
"quiesce mode, where the database continues to allow operations to run, but directs "
"clients to route new operations to other replica set members."

The current default for timeoutSecs remains 15 seconds, for both flavors of the command on mongod and mongos.

For mongos, the shutdown behavior is:
"Spends "
"'timeoutSecs' in quiesce mode, where the mongos continues to allow in-progress operations to "
"run, but directs clients to route new operations to other mongos nodes.";

After I wrote the original description of this ticket, the code was changed further, and the "120 seconds freeze time" no longer applies.

Comment by Sarah Olson [ 02/Nov/22 ]

Thanks for the confirm, milkie@mongodb.com. We're attempting to work through our backlog. We'll triage this one.

Comment by Eric Milkie [ 31/Oct/22 ]

I'm not sure why this ticket had no activity on it. I originally filed this ticket in order to get a correction made in the server documentation.

Comment by Education Bot [ 31/Oct/22 ]

Hello! This ticket has been closed due to inactivity. If you believe this ticket is still important, please reopen it and leave a comment to explain why. Thank you!

Generated at Thu Feb 08 08:03:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.