-
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
table: fix lazy check key condition in index.Create and AddRecord #51982
table: fix lazy check key condition in index.Create and AddRecord #51982
Conversation
Hi @ekexium. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Signed-off-by: ekexium <[email protected]>
aff0b98
to
482a01e
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #51982 +/- ##
================================================
- Coverage 72.3846% 71.3565% -1.0282%
================================================
Files 1477 1562 +85
Lines 427998 478528 +50530
================================================
+ Hits 309805 341461 +31656
- Misses 98950 116269 +17319
- Partials 19243 20798 +1555
Flags with carried forward coverage won't be shown. Click here to find out more.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cfzjywxk The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
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.
The insert statement will get each unique/primary key in AddRecord
then, shall we manually set PresumeKeyNotExists
for simple insert statement?
Rest LGTM.
@you06 Do you mean simple |
/hold |
…ix-ignore-on-update
/retest |
@ekexium: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@ekexium: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
…tency Signed-off-by: ekexium <[email protected]>
Won't fix this because it will inevitably introduce notable performance overhead. We may have to keep this behavior for pipelined DML |
What problem does this PR solve?
Issue Number: ref #50215
Problem Summary:
INSERT IGNORE ... ON DUPLICATE UPDATE ...
could return aDuplicate entry
error for a Pipelined-DML, because it does lazy checks in the places modified by this PR, and the error is returned when committing. It does not break data constraints, but we expect that such error should be ignored because we specifyIGNORE
, as in a normal DML.What changed and how does it work?
Change the condition of lazy check: do not let pipelined DML enforce lazy checks. If the executor think this is the place to do
txn.Get
, then do it.Note that we enforce Pipelined-DML to have
tidb_constraint_check_in_place=false
.tidb/pkg/session/session.go
Lines 4346 to 4349 in e349451
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.