-
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
transaction: fix union select for update race #19006
Conversation
@coocood update stats delta also have data race - - |
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 |
@coocood merge failed. |
Codecov Report
@@ Coverage Diff @@
## master #19006 +/- ##
===========================================
Coverage 79.5048% 79.5048%
===========================================
Files 546 546
Lines 148606 148606
===========================================
Hits 118149 118149
Misses 20978 20978
Partials 9479 9479 |
/run-all-tests |
/run-unit-test |
/merge |
/run-all-tests |
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 to release-4.0 in PR #19022 |
* transaction: fix LockKeys race * do not update delta for lock keys * fix more race * fix another race Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
What problem does this PR solve?
union select for update
statements are executed concurrently, soLockKeys
is executed concurrently too, butLockKeys
is not thread-safe, cause unexpected result.What is changed and how it works?
Lock the whole
LockKeys
method instead of map access.Related changes
Check List
Tests
Release note