-
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
store: check constraint for "Delete-Your-Writes" records when txn commit #14968
Conversation
need merge pingcap/kvproto#565 first to let CI happy and tikv will be handle by tikv/tikv#6715 |
/run-all-tests tikv=pr/6715 |
check_dev_2 fail due to it only run with tikv master by design, it should be green after kv pr merged. |
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.
Rest LGTM
LGTM |
Codecov Report
@@ Coverage Diff @@
## master #14968 +/- ##
===========================================
Coverage 80.4098% 80.4098%
===========================================
Files 503 503
Lines 133011 133011
===========================================
Hits 106954 106954
Misses 17679 17679
Partials 8378 8378 |
/rebuild |
/run-all-tests |
/run-unit-test |
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 |
Your auto merge job has been accepted, waiting for 14816 |
/run-all-tests |
@lysu merge failed. |
/merge |
Your auto merge job has been accepted, waiting for 15172 |
/run-all-tests |
@lysu merge failed. |
/merge |
/run-all-tests |
Signed-off-by: sre-bot <sre-bot@pingcap.com>
cherry pick to release-3.0 in PR #15176 |
What problem does this PR solve?
in #9127, we push constraint check down to tikv layer when prewrite phase.
but it miss the situation that txn add record a then delete record a, we also need check record is real duplicate when commit.
so just as
TestDeferConstraintCheckForDelete
, it will lead to "delete wrong data"(primary key) or "inconsist index data"(unique key)What is changed and how it works?
we can do a addition batch get check for those key before commit just like pre-#9127 logic
but maybe better to follow #9127's idea just check it with prewrite mutation flag.
Check List
Tests
Code changes
Side effects
Related changes
Release note
This change is