-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
tikv: fix infinite retry when kv region continuing to return StaleCommand error (#16481) #16528
tikv: fix infinite retry when kv region continuing to return StaleCommand error (#16481) #16528
Conversation
/run-all-tests |
@coocood, @tiancaiamao, @jackysp, @crazycs520, PTAL. |
need merge pingcap/parser#815 first |
/build |
@coocood, @tiancaiamao, @jackysp, @crazycs520, PTAL. |
It's merged. |
Signed-off-by: sre-bot <sre-bot@pingcap.com>
c22518f
to
726f600
Compare
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
@lysu |
@coocood may fault, rebase seems didn't report conflict for those two files, removed~ |
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 |
cherry-pick #16481 to release-3.0
What problem does this PR solve?
Issue Number: close #16524
Problem Summary:
tikv region will report staleCommand when it can not catch up the log and will let tidb do retry.
but stale error didn't use backoff util, so it will infinite loop when some kv region keep return stale.
it can be reproduced by
TestOnRegionError
this will make SQLs block forever if it hit those regions.
What is changed and how it works?
What's Changed:
do a little backoff before retry stale command,
How it Works:
do backoff, let retry loop has chances be broken by maxSleepTime or kill command
Related changes
Check List
Tests
Side effects
Release note
fix infinite retry when kv continuing to return staleCommand error
This change is