fix(storages): reject shared locks at disaggregated resolver#10900
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughTwo inline helpers ( ChangesDisaggregated Lock Resolution Guard
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/superpowers/specs/2026-06-15-enhance-shared-lock-tests-design.md`:
- Around line 17-18: The worktree paths in the TiFlash and Cloud Storage Engine
lines contain a spelling error where "enchance-shared-lock-tests" should be
"enhance-shared-lock-tests" (missing the 'a'). Correct this typo in both
worktree path lines to align with the correct specification naming and ensure
readers are directed to the proper paths.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 9e88cf67-3f43-455d-8241-b8cb2ae136e8
📒 Files selected for processing (5)
dbms/src/Storages/StorageDisaggregatedColumnar.cppdbms/src/Storages/StorageDisaggregatedHelpers.hdbms/src/Storages/StorageDisaggregatedRemote.cppdbms/src/Storages/tests/gtest_disagg_remote.cppdocs/superpowers/specs/2026-06-15-enhance-shared-lock-tests-design.md
848420d to
4de9ad5
Compare
4de9ad5 to
a7f3e7c
Compare
|
/retest |
TiFlash read paths should skip shared locks before emitting locked errors. Treat a shared-lock wrapper at the disaggregated resolver as an invariant violation so it is not retried or resolved with invalid wrapper txn fields. Keep ordinary lock conversion covered so existing lock-resolution behavior remains intact. Signed-off-by: Wenxuan Zhang <wenxuangm@gmail.com>
a7f3e7c to
3944181
Compare
|
/retest |
1 similar comment
|
/retest |
|
/test pull-unit-test |
Include the rejected lock key and transaction metadata when a SharedLock wrapper reaches the disaggregated resolver boundary. This keeps invariant violations easier to diagnose without attempting to resolve the wrapper. Signed-off-by: Wenxuan Zhang <wenxuangm@gmail.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JaySon-Huang, yongman 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:
|
|
/retest |
What problem does this PR solve?
Issue Number: ref #10902 ref #10704
Problem Summary:
TiFlash read paths should treat shared locks as read-compatible and skip them before reporting locked errors. If a shared-lock wrapper reaches the disaggregated lock resolver, resolving it would hide an upstream invariant violation and could interpret invalid wrapper transaction fields as a real lock.
What is changed and how it works?
This PR documents the shared-lock test coverage design, rejects shared-lock wrappers at the two disaggregated lock resolver boundaries, and adds unit coverage for both ordinary lock conversion and shared-lock wrapper rejection.
Check List
Tests
Unit test:
Side effects
Documentation
Release note
Summary by CodeRabbit
Summary
Refactor
Bug Fixes
Tests