Skip to content

txn: support shared lock (#1833)#1897

Merged
ti-chi-bot[bot] merged 6 commits intotikv:tidb-8.5from
you06:cherry-pick-1833
Feb 27, 2026
Merged

txn: support shared lock (#1833)#1897
ti-chi-bot[bot] merged 6 commits intotikv:tidb-8.5from
you06:cherry-pick-1833

Conversation

@you06
Copy link
Contributor

@you06 you06 commented Feb 24, 2026

cherry pick #1833 to tidb-8.5 branch


ref tikv/tikv#19087

Support shared lock for client-go with some limitations:

  • Shared lock cannot be PK (shared locks cannot being acquired when there is a PK choosed)
  • Txn with shared lock cannot lock keys with aggressive mode
  • Txn with shared lock cannot commit with 1pc/async commit protocol

you06 and others added 2 commits February 24, 2026 16:10
ref tikv/tikv#19087

Signed-off-by: you06 <you1474600@gmail.com>
- Update kvproto to 3586c08f7d29d6ee9eed2a5aa9d33ad24012a6d2
- Adapt test_util.go and txn_test.go to use tidb-8.5 pd/client API
  (flat package structure vs master's sub-packages)
- Replace retry.MayBackoffForRegionError with existing backoff pattern
- Remove prewriteEncounterLockPolicy/NoResolvePolicy references
  (master-only feature not available in tidb-8.5)
- Remove errorpb.GetUndeterminedResult check (not in this kvproto version)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ti-chi-bot ti-chi-bot bot added the dco-signoff: yes Indicates the PR's author has signed the dco. label Feb 24, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 24, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ti-chi-bot ti-chi-bot bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Feb 24, 2026
Signed-off-by: you06 <you1474600@gmail.com>
Signed-off-by: you06 <you1474600@gmail.com>
Signed-off-by: you06 <you1474600@gmail.com>
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Feb 24, 2026
@you06 you06 requested a review from cfzjywxk February 27, 2026 08:30
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 27, 2026
@ti-chi-bot
Copy link

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

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 Feb 27, 2026

[LGTM Timeline notifier]

Timeline:

  • 2026-02-24 10:41:43.731912255 +0000 UTC m=+178776.246706854: ☑️ agreed by zyguan.
  • 2026-02-27 11:03:30.339512401 +0000 UTC m=+7634.258678480: ☑️ agreed by cfzjywxk.

@ti-chi-bot ti-chi-bot bot merged commit 16e69ba into tikv:tidb-8.5 Feb 27, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants