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

processlist: Allow for killing the context associated with non-query operations like SetDB and Prepare. #2850

Merged
merged 2 commits into from
Feb 14, 2025

Conversation

reltuk
Copy link
Contributor

@reltuk reltuk commented Feb 14, 2025

The processlist maintains a Process struct for a given mysql.Conn, and registers a context.CancelFunc for the running operation when the handler dispatches it. This works for queries today. This PR makes it so we also register CancelFunc callbacks for operations which touch the database but do not put the connection into CommandQuery, such as Prepare and ComInit.

…operations like SetDB and Prepare.

The processlist maintains a Process struct for a given mysql.Conn, and
registers a context.CancelFunc for the running operation when the handler
dispatches it. This works for queries today. This PR makes it so we also
register CancelFunc callbacks for operations which touch the database but do
not put the connection into CommandQuery, such as Prepare and ComInit.
@reltuk reltuk requested a review from max-hoffman February 14, 2025 18:15
Copy link
Contributor

@max-hoffman max-hoffman left a comment

Choose a reason for hiding this comment

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

lgtm, doesn't look tested though

@reltuk reltuk merged commit 1e0e5e8 into main Feb 14, 2025
8 checks passed
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.

2 participants