Skip to content

[go/mysql] implement Shutdown for mysql.lListener#4285

Merged
sougou merged 1 commit intovitessio:masterfrom
LK4D4:graceful_shutdown
Oct 20, 2018
Merged

[go/mysql] implement Shutdown for mysql.lListener#4285
sougou merged 1 commit intovitessio:masterfrom
LK4D4:graceful_shutdown

Conversation

@LK4D4
Copy link
Copy Markdown
Contributor

@LK4D4 LK4D4 commented Oct 17, 2018

This method closes listener and forces all Ping requests to fail with ERServerShutdown.
The idea is to use this mechanism for graceful stop, we shutdown listener and clients will know that they should finish their work on connection ASAP
I used
https://dev.mysql.com/doc/refman/5.7/en/error-messages-server.html#error_er_server_shutdown
as a reference.
/cc @danieltahara

This method closes listener and forces all Ping requests to fail with ERServerShutdown.
I used
https://dev.mysql.com/doc/refman/5.7/en/error-messages-server.html#error_er_server_shutdown
as a reference.

Signed-off-by: Alexander Morozov <lk4d4math@gmail.com>
Copy link
Copy Markdown

@danieltahara danieltahara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm modulo questions. deferring to @sougou for review

SSHandshakeError = "08S01"

// SSServerShutdown is ER_SERVER_SHUTDOWN
SSServerShutdown = "08S01"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the same # as above. is that right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, and there is one more above it. I'm not sure what does it mean, but that's state from the reference manual for that type of error.

@sougou sougou merged commit 8ed64fb into vitessio:master Oct 20, 2018
@LK4D4 LK4D4 deleted the graceful_shutdown branch March 26, 2019 16:48
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

Successfully merging this pull request may close these issues.

3 participants