client: use batch-level runtime trace regions#11012
Conversation
Signed-off-by: bb7133 <bb7133@gmail.com> (cherry picked from commit 37bbe3e)
|
[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 |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hi @bb7133. Thanks for your PR. I'm waiting for a tikv member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
CI update: Most relevant checks are green:
The failed run is go test ./server/api -run TestRegionCPUUsageCompatibility -count=1The PR change is still limited to replacing per-request I tried to rerun the failed GitHub Actions jobs, but my token does not have repo admin permission: Could a maintainer help rerun the failed jobs? |
What problem does this PR solve?
Issue Number: ref #10965
Cherry-pick #10965 to
release-8.5-20260323-v8.5.5. This reduces Go runtime trace region overhead by using a batch-level TSO request send region.What is changed and how does it work?
This backport changes TSO dispatcher tracing from one
pdclient.tsoReqSendregion per request to onepdclient.tsoReqSendBatchregion per processed batch.Conflict note: the original master PR also touched
client/clients/router/client.go, but that router client path does not exist in this release branch, so that part is not applicable here. The final backport only changesclient/tso_dispatcher.go.Check List
Tests:
git diff --check origin/release-8.5-20260323-v8.5.5...HEADcd client && go test ./... -run '^$' -count=1cd client && go test . -run 'TestTSODispatcherTestSuite/TestBasic' -count=1cd client && go test . -run 'TestTSODispatcherTestSuite/TestBatchDelaying' -count=1cd client && go test . -run 'TestTSODispatcherTestSuite/TestBatchDelaying' -count=1 -trace /tmp/pdclient-tso-batch-20260323.traceand verified the trace containspdclient.tsoReqSendBatchRelease note