Skip to content
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 insert check after lock #19236

Merged
merged 1 commit into from
Aug 19, 2020
Merged

Conversation

cfzjywxk
Copy link
Contributor

@cfzjywxk cfzjywxk commented Aug 17, 2020

What problem does this PR solve?

Cherry-pick #19004 to release 3.0 to close #18958

What is changed and how it works?

What's Changed:

In the release 3.0 branch, the pessimistic lock will not return values for point get executor, a new flag "snapValExist" is used to mark the value using snapshot read does exist or not.
For point get executor,

  • If the key is read from the memory buffer, it has been written and should be pessimistically locked already.
  • If the key is read from the snapshot, mark the value exist flag using snapshot read results.

How it Works:

Related changes

Check List

Tests

  • Unit test

Side effects

Release note

  • fix insert duplication check does not take effect after pessimistic lock on keys.

@tiancaiamao
Copy link
Contributor

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Aug 17, 2020
@cfzjywxk
Copy link
Contributor Author

@lysu @coocood @bobotu PTAL for the release-3.0 fix

Copy link
Contributor

@bobotu bobotu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-srebot ti-srebot removed the status/LGT1 Indicates that a PR has LGTM 1. label Aug 19, 2020
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Aug 19, 2020
@coocood
Copy link
Member

coocood commented Aug 19, 2020

LGTM

@ti-srebot ti-srebot added status/LGT3 The PR has already had 3 LGTM. and removed status/LGT2 Indicates that a PR has LGTM 2. labels Aug 19, 2020
@jebter
Copy link

jebter commented Aug 19, 2020

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Aug 19, 2020
@ti-srebot
Copy link
Contributor

/run-all-tests

@jebter
Copy link

jebter commented Aug 19, 2020

/run-integration-ddl-test

@ti-srebot
Copy link
Contributor

@cfzjywxk merge failed.

@jebter
Copy link

jebter commented Aug 19, 2020

/merge

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot ti-srebot merged commit d88f03e into pingcap:release-3.0 Aug 19, 2020
@wshwsh12 wshwsh12 added this to the v3.0.18 milestone Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/executor priority/release-blocker This issue blocks a release. Please solve it ASAP. sig/transaction SIG:Transaction status/can-merge Indicates a PR has been approved by a committer. status/LGT3 The PR has already had 3 LGTM. type/bugfix This PR fixes a bug. type/3.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants