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

KILL TIDB or global KILL should cancel DDL #24144

Closed
morgo opened this issue Apr 19, 2021 · 3 comments · Fixed by #35803
Closed

KILL TIDB or global KILL should cancel DDL #24144

morgo opened this issue Apr 19, 2021 · 3 comments · Fixed by #35803
Labels
sig/sql-infra SIG: SQL Infra type/enhancement The issue or PR belongs to an enhancement.

Comments

@morgo
Copy link
Contributor

morgo commented Apr 19, 2021

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

This is forked from #24031

Currently DDL tasks must be killed with ADMIN CANCEL DDL x. The MySQL compatible way should be to use the KILL statement.

It should be possible for KILL TIDB / KILL (with global kill) to understand it is a DDL statement and execute ADMIN CANCEL DDL.

@morgo
Copy link
Contributor Author

morgo commented Apr 20, 2021

I chatted with some colleagues on this - some of this might be historical (before global kill). There is also the case that some DDL jobs can not actually be canceled, so having a different statement may be useful since it can retrun an error to the caller etc.

@cosven
Copy link
Contributor

cosven commented Apr 20, 2021

/severity moderate

@dveeden
Copy link
Contributor

dveeden commented Apr 20, 2021

With MySQL if you kill a query/connection that somehow can't be killed it will still be in the processlist with a state of 'Killed' until it is really gone. So TiDB could do something similar. A warning/info message about this would be good indeed.

See also: https://dev.mysql.com/doc/refman/8.0/en/general-thread-states.html

@xiongjiwei xiongjiwei added type/enhancement The issue or PR belongs to an enhancement. and removed type/bug The issue is confirmed as a bug. severity/moderate labels Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/sql-infra SIG: SQL Infra type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants