coprocessor: add bucket version to store batch task#1488
Conversation
Signed-off-by: Ziqian Qin <eke@fastmail.com> (cherry picked from commit 46e67d1) Signed-off-by: Ziqian Qin <eke@fastmail.com>
There was a problem hiding this comment.
Pull request overview
Cherry-picks upstream kvproto change to extend the coprocessor StoreBatchTask protobuf with a buckets_version field (id=7), keeping the release branch in sync while updating generated artifacts.
Changes:
- Add
StoreBatchTask.buckets_version(uint64, field number 7) toproto/coprocessor.proto. - Regenerate Go protobuf output for the new field (struct field, getter, marshal/size/unmarshal, descriptor bytes).
- Update
scripts/proto.lockto reflect the new protobuf field metadata.
Reviewed changes
Copilot reviewed 1 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| scripts/proto.lock | Records the newly added buckets_version field (id=7) in the locked proto schema metadata. |
| proto/coprocessor.proto | Adds buckets_version to StoreBatchTask for bucket-metadata version validation. |
| pkg/coprocessor/coprocessor.pb.go | Regenerated Go protobuf code to include BucketsVersion field support (getter + (un)marshal/size updates). |
Files not reviewed (1)
- pkg/coprocessor/coprocessor.pb.go: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@wfxr: adding LGTM is restricted to approvers and reviewers in OWNERS files. DetailsIn response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: wfxr 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 |
Cherry-pick of #1478 to
release-nextgen-20251011.What is changed
Add
buckets_versiontocoprocessor.StoreBatchTaskso store-batched coprocessor requests can carry the bucket metadata version for each child task.Why
Store-batched cop requests group child tasks by store, but the child tasks can belong to different regions. A single parent request context bucket version is not enough for downstream validation; TiDB/CSE need a per-child bucket version to avoid validating a child region with the parent task bucket version.
This is the wire-format prerequisite for fixing pingcap/tidb#68715.
Compatibility
This adds a new proto3
uint64field with a new tag. Older clients and servers ignore the unknown field, and newer clients get the default value0when talking to older senders. Downstream code should treat0as unset and fall back to the existing parent request context behavior.Checks
make gogo build ./pkg/...