coprocessor: scope batch merge capability to analyze - #1504
Conversation
Add an explicit negotiation for merging the results of batched coprocessor tasks into the main response: - Request.allow_batch_task_data_merge: the client declares it can consume a response whose batched tasks' results are merged into the single result carried by the response's data (e.g. the per-region sampling results of a batched analyze request). - StoreBatchTaskResponse.data_merged_into_response: the store acknowledges a merged task; the batch response carries no data of its own but still acknowledges the task and carries its execution details. A store that does not support merging keeps responding per task, and a client that does not set the request field keeps receiving per-task responses, so either side can upgrade first. Signed-off-by: 0xPoe <poe.liu@pm.me>
Signed-off-by: 0xTars <1196089730@qq.com>
|
[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 |
|
|
Signed-off-by: 0xTars <1196089730@qq.com>
This is the protocol part of the coordinated full-sampling Analyze batching change and follows up on #1497.
What changed
allow_analyze_batch_task_data_mergeso the generated API reflects its Analyze-only scope.StoreBatchTaskResponse.data_merged_into_responseas the per-task acknowledgement.scripts/proto.lock.The rename keeps the same protobuf tag, scalar type, and default as the earlier draft (
bool, tag 18, false). The wire representation is therefore unchanged: true encodes as90 01 01, while false is omitted. Only generated source/reflection names change, which is safe while the dependent TiKV and TiDB changes are still draft-only.Validation
make checkmake proto-fmt-checkgo test ./...git diff --checkDependent drafts
Both consumer drafts pin this published commit and are submitted as part of the same coordinated change.