cli: the --drain-wait
arg for the drain
command should check the server.shutdown.*_wait
cluster settings
#98388
Labels
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
T-server-and-security
DB Server & Security
Is your feature request related to a problem? Please describe.
We have this guidance in our docs right now. https://www.cockroachlabs.com/docs/stable/node-shutdown.html#drain-timeout
This is pretty easy for anyone to miss. The impact of not setting
--drain-wait
high enough is that the drain command will be cancelled, and node shutdown will proceed non-gracefully.Describe the solution you'd like
The code that uses the
--drain-wait
argument should first check the values of server.shutdown.drain_wait, server.shutdown.connection_wait, server.shutdown.query_wait, and server.shutdown.lease_transfer_wait, and if needed, increase the value of--drain-wait
to be larger than our recommendation.Describe alternatives you've considered
Instead of automatically computing
--drain-wait
, we could fail loudly and tell the user to explicitly setdrain-wait
to an appropriate value.Jira issue: CRDB-25243
The text was updated successfully, but these errors were encountered: