Add Op::SharedLock and Op::SharedPessimisticLock for acquiring shared lock in pessimistic transacitons.#1374
Merged
ti-chi-bot[bot] merged 4 commits intopingcap:masterfrom Dec 18, 2025
Merged
Conversation
Contributor
Author
|
/hold the shared lock may need more compatibility changes. |
cfzjywxk
approved these changes
Nov 13, 2025
zyguan
approved these changes
Nov 13, 2025
13 tasks
Op::SharedLock for compatibilityOp::SharedLock and Op::SharedPessimisticLock for compatibility
cfzjywxk
approved these changes
Nov 17, 2025
zyguan
approved these changes
Nov 17, 2025
Contributor
|
@you06 Should we remove the |
Contributor
Author
|
/unhold |
Signed-off-by: you06 <you1474600@gmail.com>
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>
zyguan
approved these changes
Dec 16, 2025
Signed-off-by: you06 <you1474600@gmail.com>
Op::SharedLock and Op::SharedPessimisticLock for compatibilityOp::SharedLock and Op::SharedPessimisticLock for acquiring shared lock in pessimistic transacitons.
Signed-off-by: you06 <you1474600@gmail.com>
cfzjywxk
approved these changes
Dec 18, 2025
|
[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 |
[LGTM Timeline notifier]Timeline:
|
you06
added a commit
to you06/kvproto
that referenced
this pull request
Feb 13, 2026
…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>
ti-chi-bot bot
pushed a commit
that referenced
this pull request
Feb 24, 2026
…ared lock in pessimistic transacitons. (#1374) (#1417) * reserve Op for shared lock * distinguish between shared prewrite locks and shared pessimistic locks (#1377) * let LockInfo carry the full txn info when it's shared * move the todo comment to the proper place * distinguish between shared prewrite locks and shared pessimistic locks --------- * update kvproto * add embed shared_lock_infos --------- Signed-off-by: you06 <you1474600@gmail.com> Signed-off-by: zyguan <zhongyangguan@gmail.com> Co-authored-by: zyguan <zhongyangguan@gmail.com>
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.
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).