pessimistic-transaction: clarify Point Get lock behavior for non-existing keys under different isolation levels#21740
Merged
ti-chi-bot[bot] merged 4 commits intoJun 24, 2026
Conversation
Synced from: pingcap/docs#23111 Target PR: pingcap#21740 AI Provider: azure Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
|
Auto-sync completed successfully Source PR: pingcap/docs#23111 Chinese documentation has been updated based on English documentation changes. |
qiancai
commented
Jun 24, 2026
qiancai
commented
Jun 24, 2026
Collaborator
Author
|
/approve |
Collaborator
Author
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: qiancai The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Member
|
In response to a cherrypick label: new pull request created to branch |
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is translated from: pingcap/docs#23111
What is changed, added or deleted? (Required)
Added a Note in the
Behaviorssection ofpessimistic-transaction.mdto clarify that the Point Get and Batch Point Get lock behavior for non-existing keys applies only to theREPEATABLE READisolation level.Under the
READ COMMITTEDisolation level,Point GetandBatch Point Getoperators do not lock non-existent keys. This is a behavioral difference that can affect applications usingSELECT FOR UPDATEfor existence checks followed byINSERT.Which TiDB version(s) do your changes apply to? (Required)
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?
Verification
This behavior was verified on TiDB v8.5.3:
id = 999id = 888id IN (777, 888)id BETWEEN 100 AND 200A test script was provided in the PR comments for reviewers to verify the behavior locally.