-
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: change pessimistic lock wait start for one statement #13922
Conversation
Codecov Report
@@ Coverage Diff @@
## master #13922 +/- ##
================================================
- Coverage 80.2726% 80.1454% -0.1272%
================================================
Files 480 480
Lines 120898 120043 -855
================================================
- Hits 97048 96209 -839
- Misses 16143 16151 +8
+ Partials 7707 7683 -24 |
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, can we add a test case via failpoint to return WriteConflictError once?
I'll add one |
LGTM |
/run-all-tests |
/run-all-tests |
/run-all-tests |
cherry pick to release-3.0 failed |
It seems that, not for sure, we failed to cherry-pick this commit to release-3.0. Please comment '/run-cherry-picker' to try to trigger the cherry-picker if we did fail to cherry-pick this commit before. @cfzjywxk PTAL. |
What problem does this PR solve?
When retry is needed, like write conflict or single statement rollback for pessimistic transactions, the Pessimistic transaction lock wait start time will be reset to
time.Now()
inActionPessimisitcLock.HandleBatch
.What is changed and how it works?
Add one field in
stmtCtx
recording the pessimistic lock wait start time, and reuse this value when doing retryCheck List
Tests
innodb_lock_wait_timeout
to 10 secondsCode changes
Side effects
Related changes
Release note