-
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
*: fix a bug that the pessimistic lock doesn't work on a partition #14921
*: fix a bug that the pessimistic lock doesn't work on a partition #14921
Conversation
physicalID should be used if 'select for update' works on a partitioned table.
@tiancaiamao please fix check_dev |
Codecov Report
@@ Coverage Diff @@
## master #14921 +/- ##
===========================================
Coverage ? 80.5881%
===========================================
Files ? 502
Lines ? 133269
Branches ? 0
===========================================
Hits ? 107399
Misses ? 17500
Partials ? 8370 |
LGTM |
PTAL @winoros |
1 similar comment
PTAL @winoros |
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 |
/merge |
/run-all-tests |
@tiancaiamao merge failed. |
/run-all-tests |
Signed-off-by: sre-bot <sre-bot@pingcap.com>
cherry pick to release-3.0 in PR #15085 |
…ingcap#14921) physicalID should be used if 'select for update' works on a partitioned table.
cherry pick to release-4.0 in PR #15086 |
…ingcap#14921) physicalID should be used if 'select for update' works on a partitioned table.
What problem does this PR solve?
'select ... for update' doesn't work right on a partitioned table.
In pessimistic txn mode, txn2 should be blocked.
What is changed and how it works?
The bug is that we use table ID to construct the lock key.
On a partitioned table, partition ID should be used.
Changes:
Check List
Tests
Code changes
Side effects
Related changes
Release note