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

pxc_maint_mode is removing node immediately at shutdown. #2533

Closed
altmannmarcelo opened this issue Feb 17, 2020 · 1 comment
Closed

pxc_maint_mode is removing node immediately at shutdown. #2533

altmannmarcelo opened this issue Feb 17, 2020 · 1 comment

Comments

@altmannmarcelo
Copy link

ProxySQL 2.0.9 introduced the awareness of pxc_maint_mode. This is meant to allow for already established connections to finish its work.
PXC changes and expose this variable as follow:

  • Change to SHUTDOWN - It changes the value of pxc_maint_mode to SHUTDOWN immediately and sleep for pxc_maint_transition_period prior to starting the shutdown.
  • Change to MAINTENANCE - It changes the value of pxc_maint_mode to MAINTENANCE immediately.

ProxySQL is removing the server immediately instead of marking it as OFFLINE_SOFT, which despite the purpose of the feature.

How to reproduce:

Setup: 3PXC nodes, single writer.

  • Connect on proxysql via 6033 port (will name it CNX1)
  • CNX1: run START TRANSACTION and leave the terminal open
  • Connect directly on wirter (will name it CNX2)
  • CNX2: Change the maint period to 30 seconds SET GLOBAL pxc_maint_transition_period = 30;
  • stop mysql on writer (service mysql stop) . This will hang for 30 seconds before initiating the shutdown
  • CNX1: execute any query, such as SELECT SLEEP(1). At this point, you will receive:
ERROR 2013 (HY000): Lost connection to MySQL server during query

You can validate that the server is still up by execting a new connection directly to the writer.

The same issue happens when changing pxc_maint_mode to MAINTENANCE, all open connections (with multiplexing disabled) are closed immediately.

@renecannao
Copy link
Contributor

Fixed in 2.0.10

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

2 participants