-
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
tikv: fix infinite retry when kv region continuing to return StaleCommand error (#16481) #16529
tikv: fix infinite retry when kv region continuing to return StaleCommand error (#16481) #16529
Conversation
/run-all-tests |
@coocood, @tiancaiamao, @jackysp, @crazycs520, PTAL. |
need merge pingcap/parser#816 first |
@coocood, @tiancaiamao, @jackysp, @crazycs520, PTAL. |
It is merged. Please update go.mod |
Signed-off-by: sre-bot <[email protected]>
0807fe4
to
b2e3692
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
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 |
@sre-bot merge failed. |
/merge |
Sorry @lysu, you don't have permission to trigger auto merge event on this branch. |
/run-all-tests |
/run-common-test |
/run-unit-test |
cherry-pick #16481 to release-3.1
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