-
Notifications
You must be signed in to change notification settings - Fork 726
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
tso: fix the bug that TSO request may fail at the time of leader changing (#2665) #2666
tso: fix the bug that TSO request may fail at the time of leader changing (#2665) #2666
Conversation
Signed-off-by: ti-srebot <[email protected]>
Codecov Report
@@ Coverage Diff @@
## release-4.0 #2666 +/- ##
===============================================
- Coverage 77.16% 77.13% -0.04%
===============================================
Files 204 205 +1
Lines 21940 22207 +267
===============================================
+ Hits 16931 17130 +199
- Misses 3724 3768 +44
- Partials 1285 1309 +24
Continue to review full report at Codecov.
|
@JmPotato,Thanks for your review. However, LGTM is restricted to Reviewers or higher roles.See the corresponding SIG page for more information. Related SIGs: scheduling(slack). |
/merge |
Sorry @disksing, you don't have permission to trigger auto merge event on this branch. |
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
/run-integration-common-test |
/run-integration-compatibility-test |
/run-integration-ddl-test |
/merge |
/run-all-tests |
cherry-pick #2665 to release-4.0
Signed-off-by: JmPotato [email protected]
Close #2663
What problem does this PR solve?
Under the current latest version of PD, TSO request may fail at the time of leader changing because
SyncTimestamp
is not yet completed but PD receives a TSO request at the same time.What is changed and how it works?
Add leader lease check and try to sleep a while to wait for
SyncTimestamp
.Check List
Tests
Code changes
GetRespTS
method changeRelated changes
Release note
Fix the bug that TSO request may fail at the time of leader changing.