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

RFC: Add Support for Kill Statement #13438

Open
harshit-gangal opened this issue Jul 5, 2023 · 0 comments
Open

RFC: Add Support for Kill Statement #13438

harshit-gangal opened this issue Jul 5, 2023 · 0 comments

Comments

@harshit-gangal
Copy link
Member

Kill statement provides 2 options to the clients

  1. Kill the connection (kill <thread_id>)
  2. Kill the query on the connection (kill query <thread_id>)

When a kill connection is executed, VTGate should:

  • interrupt any running query
  • rollback any open transactions
  • close the connection with the client

When a kill connection is executed, VTGate should:

  • interrupt any running query

The thread_id is currently sent in the handshake packet to the client and the client uses this thread_id to send any kill statement on the new connection.

As the kill statement is sent on a different connection there are multiple scenarios here:

  1. Single VTGate
  2. Multiple VTGates
  3. Using GRPC API of VTGates.

Scenario 1: Single VTGate
This is a straightforward implementation where VTGate could look up the thread_id and take kill action on it.

Scenario 2: Multiple VTGate
This would require coordination between VTGates related to thread_id. In the current architecture, VTGates do not interact with each other.
Currently, out of scope.

Scenario 3: Grpc API VTGate
This cannot be supported as VTGate have little to no information about the client and the connection as all the information is stored with the client. Also, the grpc connections do not have a thread_id associated with it which is a MySQL protocol information. Hence, this is out of scope.

@harshit-gangal harshit-gangal changed the title Add Support for Kill Statement RFC: Add Support for Kill Statement Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant