-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Remove shard session held in vtgate for reserved connection on connection failure #6522
Remove shard session held in vtgate for reserved connection on connection failure #6522
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's ok to keep the connection. Otherwise, we'll start churning connections on things like syntax error, etc. Was there a use case where keeping the connection would be harmful?
In a transaction, when a connection is closed/lost, server expectation is to receive commit/rollback. Currently, the reset happens only for below two mysql error codes.
|
We should also look at the list of what other possible error codes which says that the server connection is no longer valid. |
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
… failure Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
2ceae0c
to
580f805
Compare
When a reserved connection is used in transaction it is natural to call rollback/commit when a query execution failed.
But, when a reserved connection is used in non-transaction/autocommit mode, VTGate needs to handle to case to release the held reserved connection in session, to move forward on next query and recreate the reserved connection with correct settings.