-
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
txn: fix pessimitic exist check #19004
Conversation
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.
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
The key flag for |
Due to we need cherry-pick this commit to release branch which uses the older memdb, we'd better not use any new memdb features in this PR. |
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 |
@cfzjywxk merge failed. |
Codecov Report
@@ Coverage Diff @@
## master #19004 +/- ##
===========================================
Coverage 79.4730% 79.4730%
===========================================
Files 546 546
Lines 148522 148522
===========================================
Hits 118035 118035
Misses 20996 20996
Partials 9491 9491 |
/merge |
/run-all-tests |
@cfzjywxk merge failed. |
Seems something wrong that test session package with |
/run-all-tests |
The failure is because if pessimistic write conflict happens in |
/run-all-tests |
/merge |
/run-all-tests |
@cfzjywxk merge failed. |
/run-integration-copr-test |
/merge |
/run-all-tests |
@cfzjywxk merge failed. |
/merge |
/run-all-tests |
@cfzjywxk merge failed. |
/run-unit-test |
/merge |
/run-all-tests |
@cfzjywxk merge failed. |
/run-check_dev_2 |
What problem does this PR solve?
Issue Number: close #18958
Problem Summary:
The pessimistic lock added by the previous SQL statements will invalid the latter existence check on some keys, some duplicates are not checked and the transaction commit successfully which should fail.
What is changed and how it works?
What's Changed:
presume not exist
flag in statement context.LockKeys
function for pessimistic transactions, report error if the value already exists.How it Works:
Related changes
Check List
Tests
Side effects
Release note