Repository navigation
Conversation
ref pingcap/tidb#67449 (cherry picked from commit 6667175) Signed-off-by: 0xPoe <poe.liu@pm.me>
|
[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 |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Merged into #2173, which now carries both picks. |
What problem does this PR solve?
Issue Number: ref pingcap/tidb#67449
Cherry-pick of #2029 to
tidb-8.5. The TiDB release-8.5 backport of batched Analyze (pingcap/tidb#73139) sends store-batched coprocessor requests. Without this change, resource control charges only the main task of each batch, because the execution details of the other tasks are in the nested batch responses.What is changed and how does it work?
Same change as #2029:
MakeResponseInfoadds the read bytes and KV CPU of every nested batch response.tidb-8.5has no NextGen read-byte rule and its kvproto has noTotalVersionsSize, so the nested responses useProcessedVersionsSize, as the top-level response already does there.Tests
go test ./internal/resourcecontrol/ -count=1: passes. Without theresource_control.gochange,TestResponseInfoBatchedTasksfails (80 read bytes instead of 118, 1µs KV CPU instead of 1.3µs).Summary by CodeRabbit