Add Op::SharedLock and Op::SharedPessimisticLock for acquiring shared lock in pessimistic transacitons. (#1374)#1417
Merged
ti-chi-bot[bot] merged 1 commit intopingcap:release-8.5from Feb 24, 2026
Conversation
…ared lock in pessimistic transacitons. (pingcap#1374) * reserve Op for shared lock Signed-off-by: you06 <you1474600@gmail.com> * distinguish between shared prewrite locks and shared pessimistic locks (pingcap#1377) * let LockInfo carry the full txn info when it's shared Signed-off-by: zyguan <zhongyangguan@gmail.com> * move the todo comment to the proper place Signed-off-by: zyguan <zhongyangguan@gmail.com> * distinguish between shared prewrite locks and shared pessimistic locks Signed-off-by: zyguan <zhongyangguan@gmail.com> --------- Signed-off-by: zyguan <zhongyangguan@gmail.com> * update kvproto Signed-off-by: you06 <you1474600@gmail.com> * add embed shared_lock_infos Signed-off-by: you06 <you1474600@gmail.com> --------- Signed-off-by: you06 <you1474600@gmail.com> Signed-off-by: zyguan <zhongyangguan@gmail.com> Co-authored-by: zyguan <zhongyangguan@gmail.com>
zyguan
approved these changes
Feb 24, 2026
cfzjywxk
approved these changes
Feb 24, 2026
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cfzjywxk, zyguan 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 |
13 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.
Cherry pick #1374 to release-8.5 branch.
ref #1369, ref #1377, ref #1378, tikv/tikv#19087
#1369 added an enum type
SharedLockforOpin a specific branch, this PR reverse this field in master branch to keep compatibility.#1377 devided the
Opfor shared lock into 2 phases (pessimistic lock phase and prewrite phase).