-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
expression: make sleep
function response to the kill statement
#10959
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10959 +/- ##
================================================
- Coverage 80.8878% 80.8839% -0.0039%
================================================
Files 418 418
Lines 89184 89187 +3
================================================
- Hits 72139 72138 -1
- Misses 11804 11806 +2
- Partials 5241 5243 +2 |
Codecov Report
@@ Coverage Diff @@
## master #10959 +/- ##
===========================================
Coverage 81.0646% 81.0646%
===========================================
Files 418 418
Lines 89473 89473
===========================================
Hits 72531 72531
Misses 11716 11716
Partials 5226 5226 |
/run-all-tests |
/run-all-tests |
/run-unit-test |
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.
LGTM
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.
LGTM, period check maybe look good for current code - -
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.
==
@tiancaiamao I think I found a bug 🤔 In MySQL:
but in TiDB:
it seems we only can kill one operator, but if later operators have time-wasted task, the query cannot return immediately |
@lysu Good job, you find a bug! But this is not true:
The real problem is that To verify that, you can try this, this takes 5s:
As a contrast, this query returns immediately:
When there is a |
I think we can file an issue, and merge this PR first. |
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.
LGTM
PTAL @lysu |
What problem does this PR solve?
Fixes #10955
Execute
select sleep()
in one session, andkill tidb query xxx
in another session,the
sleep
query is not interrupted.What is changed and how it works?
Check the
Killed
variable once in a while during the sleep function.Check List
Tests
Unit test
Need to cherry-pick to the release branch