Skip to content

Add Op::SharedLock and Op::SharedPessimisticLock for acquiring shared lock in pessimistic transacitons.#1374

Merged
ti-chi-bot[bot] merged 4 commits intopingcap:masterfrom
you06:shared-lock
Dec 18, 2025
Merged

Add Op::SharedLock and Op::SharedPessimisticLock for acquiring shared lock in pessimistic transacitons.#1374
ti-chi-bot[bot] merged 4 commits intopingcap:masterfrom
you06:shared-lock

Conversation

@you06
Copy link
Contributor

@you06 you06 commented Nov 11, 2025

ref #1369, ref #1377, ref #1378, tikv/tikv#19087

#1369 added an enum type SharedLock for Op in a specific branch, this PR reverse this field in master branch to keep compatibility.
#1377 devided the Op for shared lock into 2 phases (pessimistic lock phase and prewrite phase).

@ti-chi-bot ti-chi-bot bot added the size/M label Nov 11, 2025
@you06
Copy link
Contributor Author

you06 commented Nov 13, 2025

/hold the shared lock may need more compatibility changes.

@ti-chi-bot ti-chi-bot bot removed the lgtm label Nov 17, 2025
@you06 you06 changed the title reserve Op::SharedLock for compatibility reserve Op::SharedLock and Op::SharedPessimisticLock for compatibility Nov 17, 2025
@cfzjywxk
Copy link
Contributor

@you06 Should we remove the DNM flag and continue merge?

@you06
Copy link
Contributor Author

you06 commented Dec 16, 2025

/unhold

you06 and others added 2 commits December 16, 2025 17:46
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>
Signed-off-by: you06 <you1474600@gmail.com>
@ti-chi-bot ti-chi-bot bot added size/XXL and removed size/M labels Dec 18, 2025
@you06 you06 changed the title reserve Op::SharedLock and Op::SharedPessimisticLock for compatibility Add Op::SharedLock and Op::SharedPessimisticLock for acquiring shared lock in pessimistic transacitons. Dec 18, 2025
Signed-off-by: you06 <you1474600@gmail.com>
@ti-chi-bot
Copy link

ti-chi-bot bot commented 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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot
Copy link

ti-chi-bot bot commented Dec 18, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-11-13 08:27:33.879712264 +0000 UTC m=+949903.322742143: ☑️ agreed by cfzjywxk.
  • 2025-11-13 09:11:11.641027271 +0000 UTC m=+952521.084057260: ☑️ agreed by zyguan.
  • 2025-11-17 10:08:41.733092682 +0000 UTC m=+1301571.176122561: ✖️🔁 reset by you06.
  • 2025-11-17 11:02:00.770429608 +0000 UTC m=+1304770.213459487: ☑️ agreed by cfzjywxk.
  • 2025-11-17 11:48:39.1178268 +0000 UTC m=+1307568.560856669: ☑️ agreed by zyguan.
  • 2025-12-16 08:47:37.861275399 +0000 UTC m=+1549202.675052971: ✖️🔁 reset by you06.
  • 2025-12-16 10:02:03.604997168 +0000 UTC m=+1553668.418774740: ☑️ agreed by zyguan.
  • 2025-12-18 09:29:15.847385429 +0000 UTC m=+1724500.661163021: ☑️ agreed by cfzjywxk.

@ti-chi-bot ti-chi-bot bot merged commit 9f0ac2f into pingcap:master Dec 18, 2025
5 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants