-
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
executor: kill tableReader for each connection correctly (#18277) #18505
executor: kill tableReader for each connection correctly (#18277) #18505
Conversation
Signed-off-by: ti-srebot <[email protected]>
/run-all-tests |
@fzhedu please accept the invitation then you can push to the cherry-pick pull requests. |
/rebuild |
1 similar comment
/rebuild |
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
/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
/merge |
/run-all-tests |
@ti-srebot merge failed. |
/merge |
Your auto merge job has been accepted, waiting for:
|
/run-all-tests |
cherry-pick #18277 to release-4.0
What problem does this PR solve?
Issue Number: close a part of #18057
Problem Summary:
The tableReader in the coprocessor may retry many times to read regions, druing which, it cannot be aware of the cancelation from client. It may take much of memory for a long time.
What is changed and how it works?
Proposal: detect
Killed
to stop the goroutine.What's Changed: should not use
CompareAndSwap
to change theKilled
before Close(), because many runninig goroutines should detect theKilled
.How it Works: the TableReader the detect the
killed
in every loop.The query may not exit quickly, because the query do some close work.
Check List
Tests
test on mocktikv:
similarly test on TiFlash is ok.
Release note