Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback: Node Shutdown #18909

Open
jameslupolthrd opened this issue Sep 13, 2024 · 0 comments
Open

Feedback: Node Shutdown #18909

jameslupolthrd opened this issue Sep 13, 2024 · 0 comments

Comments

@jameslupolthrd
Copy link

jameslupolthrd commented Sep 13, 2024

Page: https://cockroachlabs.com/docs/v24.2/node-shutdown.html

What is the reason for your feedback?

[ ] Missing the information I need

[ ] Too complicated

[ ] Out of date

[ ] Something is broken

[ X] Other

Some parts of the drain documentation are confusing:

Clients are disconnected, and subsequent connection requests are sent to other nodes.

This makes it sound like a node can redirect client (SQL or DistSQL?) connections to other nodes, which I'd be surprised to hear is true. I suspect this means the load balancer will redirect new connections to a different node, but it's ambiguous due to the use of the passive voice.

2. SQL wait phase: New SQL client connections are no longer permitted, and any remaining SQL client connections are allowed to close or time out. This phase completes either when all SQL client connections are closed or the [maximum duration set by server.shutdown.connections.timeout](https://www.cockroachlabs.com/docs/stable/node-shutdown#server-shutdown-connections-timeout) is reached.

3. SQL drain phase: All active transactions and statements for which the node is a [gateway](https://www.cockroachlabs.com/docs/v24.2/architecture/life-of-a-distributed-transaction#gateway) are allowed to complete, and CockroachDB closes the SQL client connections immediately afterward. After this phase completes, CockroachDB closes all remaining SQL client connections to the node. This phase completes either when all transactions have been processed or the [maximum duration set by server.shutdown.transactions.timeout](https://www.cockroachlabs.com/docs/stable/node-shutdown#server-shutdown-transactions-timeout) is reached.

So in phase 2, we shut down client connections, and in phase 3 we wait for all active transactions and statements for which the node is a gateway to finish -- but an active transaction or statement requires a SQL client connection, which we removed in phase 2. This must either be ambiguous or inaccurate.

Additional details

Jira issue: DOC-11123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant