Skip to content

coprocessor: scope batch merge capability to analyze - #1504

Closed
0xTars wants to merge 3 commits into
pingcap:masterfrom
0xTars:tars/analyze-two-phase
Closed

coprocessor: scope batch merge capability to analyze#1504
0xTars wants to merge 3 commits into
pingcap:masterfrom
0xTars:tars/analyze-two-phase

Conversation

@0xTars

@0xTars 0xTars commented Jul 23, 2026

Copy link
Copy Markdown

This is the protocol part of the coordinated full-sampling Analyze batching change and follows up on #1497.

What changed

  • Add an explicit, default-false client capability for merging full-sampling Analyze batch-task data into the outer response.
  • Name the request field allow_analyze_batch_task_data_merge so the generated API reflects its Analyze-only scope.
  • Keep StoreBatchTaskResponse.data_merged_into_response as the per-task acknowledgement.
  • Regenerate Go code and update scripts/proto.lock.
  • Add a wire/default regression for field 18.

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 as 90 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 check
  • make proto-fmt-check
  • go test ./...
  • git diff --check

Dependent drafts

Both consumer drafts pin this published commit and are submitted as part of the same coordinated change.

0xPoe and others added 2 commits July 14, 2026 14:13
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>
@ti-chi-bot

ti-chi-bot Bot commented Jul 23, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign cfzjywxk for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot
ti-chi-bot Bot requested a review from mornyx July 23, 2026 15:11
@ti-chi-bot ti-chi-bot Bot added the size/XL label Jul 23, 2026
@pingcap-cla-assistant

pingcap-cla-assistant Bot commented Jul 23, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 2 committers have signed the CLA.

❌ 0xTars
❌ 0xPoe
You have signed the CLA already but the status is still pending? Let us recheck it.

Signed-off-by: 0xTars <1196089730@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants