Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (18)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change adds transaction protocol version selection to unary and streaming region requests. It adds store protocol-range metadata, supports one compatibility resend after a qualifying rejection, and propagates incompatible-request and undetermined-result errors through client and lock-resolution paths. ChangesTransaction protocol and terminal errors
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~45 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant RegionClient
participant Cluster
participant RpcCall
participant TiKV
RegionClient->>Cluster: read request origin and protocol ceiling
RegionClient->>RpcCall: set context with selected protocol version
RpcCall->>TiKV: send request
TiKV-->>RegionClient: return incompatible-request response
RegionClient->>RegionClient: validate rejection and select compatible version
RegionClient->>RpcCall: set context for one compatibility resend
RpcCall->>TiKV: resend request
TiKV-->>RegionClient: return response
Suggested reviewers: Merge Risk: ⚪ Minimal · up to This change negotiates a transaction protocol version with each TiKV store and rejects unsupported requests before sending them. Incompatible or undetermined results are reported as final errors instead of being retried. Stores that do not report a supported range keep the legacy protocol, and at most one downgrade resend occurs. No concrete defect remains, so the change looks ready to merge after normal CI. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 7.69% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 52 functions across 16 files. (2 skipped: 2 unsupported.)
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 |
Signed-off-by: zyguan <zhongyangguan@gmail.com>
b9e325f to
d342ebe
Compare
Ref: tikv/tikv#20085
Summary
Add transaction RPC compatibility protection for mixed-version TiKV clusters.
Testing
ci/build-test.shvialocal/tikv-client-c-builder:latestkv_client_testpassedbank_testpassedSummary by CodeRabbit
New Features
Bug Fixes
Tests