coprocessor: add batch task data merge negotiation fields - #1497
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 |
|
|
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>
bb066a1 to
a15dd9c
Compare
Opt Analyze into kvproto batch-task data merging and consume explicit per-task acknowledgements without emitting empty responses. A task without an acknowledgement remains on the existing retry path, so mixed-version stores cannot cause silent statistics loss. Temporarily replace kvproto with the revision from pingcap/kvproto#1497 until that protocol change merges. Signed-off-by: 0xPoe <poe.liu@pm.me>
Opt Analyze into kvproto batch-task data merging and consume explicit per-task acknowledgements without emitting empty responses. A task without an acknowledgement remains on the existing retry path, so mixed-version stores cannot cause silent statistics loss. Temporarily replace kvproto with the revision from pingcap/kvproto#1497 until that protocol change merges. Signed-off-by: 0xPoe <poe.liu@pm.me>
Temporarily point kvproto at the revision carrying pingcap/kvproto#1497. The request opt-in and per-task acknowledgement fields let TiKV and its clients upgrade independently. Signed-off-by: 0xPoe <poe.liu@pm.me>
Temporarily point kvproto at the revision carrying pingcap/kvproto#1497. The request opt-in and per-task acknowledgement fields let TiKV and its clients upgrade independently. Signed-off-by: 0xPoe <poe.liu@pm.me>
Temporarily point kvproto at the revision carrying pingcap/kvproto#1497. The request opt-in and per-task acknowledgement fields let TiKV and its clients upgrade independently. Signed-off-by: 0xPoe <poe.liu@pm.me>
Temporarily point kvproto at the revision carrying pingcap/kvproto#1497. The request opt-in and per-task acknowledgement fields let TiKV and its clients upgrade independently. Signed-off-by: 0xPoe <poe.liu@pm.me>
Opt Analyze into kvproto batch-task data merging and consume explicit per-task acknowledgements without emitting empty responses. A task without an acknowledgement remains on the existing retry path, so mixed-version stores cannot cause silent statistics loss. Temporarily replace kvproto with the revision from pingcap/kvproto#1497 until that protocol change merges. Signed-off-by: 0xPoe <poe.liu@pm.me>
Opt Analyze into kvproto batch-task data merging and consume explicit per-task acknowledgements without emitting empty responses. A task without an acknowledgement remains on the existing retry path, so mixed-version stores cannot cause silent statistics loss. Temporarily replace kvproto with the revision from pingcap/kvproto#1497 until that protocol change merges. Signed-off-by: 0xPoe <poe.liu@pm.me>
Temporarily point kvproto at the revision carrying pingcap/kvproto#1497. The request opt-in and per-task acknowledgement fields let TiKV and its clients upgrade independently. Signed-off-by: 0xPoe <poe.liu@pm.me>
Opt Analyze into kvproto batch-task data merging and consume explicit per-task acknowledgements without emitting empty responses. A task without an acknowledgement remains on the existing retry path, so mixed-version stores cannot cause silent statistics loss. The acknowledgement path keeps each task's execution details as unconsumed stats through a nil-safe runtime-stats append, extracted and shared with the existing unconsumed-stats collection. Temporarily replace kvproto with the revision from pingcap/kvproto#1497 until that protocol change merges. Signed-off-by: 0xPoe <poe.liu@pm.me>
|
[FORMAT CHECKER NOTIFICATION] Notice: To remove the 📖 For more info, you can check the "Contribute Code" section in the development guide. |
What problem does this PR solve?
TiKV can reduce batched analyze response traffic by merging per-task results into
Response.data. However, an emptybatch_responsescannot distinguish merged results from unprocessed tasks, which can cause double counting and lose execution details.What is changed and how it works?
Add explicit negotiation:
Request.allow_batch_task_data_mergelets the client opt in.StoreBatchTaskResponse.data_merged_into_responseconfirms that a task's data was merged while preserving itsexec_details_v2.Without client opt-in or store support, per-task responses remain unchanged.
Consumers: TiKV (draft) and pingcap/tidb#69686.
Ref: pingcap/tidb#67449.