pkg/executor, pkg/kv, pkg/store: propagate SQL digest for MPP task metadata (#66763) - #69465
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ 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 |
|
/cc @windtalker @gengliqi |
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## release-nextgen-202603 #69465 +/- ##
===========================================================
Coverage ? 76.1642%
===========================================================
Files ? 1935
Lines ? 539949
Branches ? 0
===========================================================
Hits ? 411248
Misses ? 128701
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gengliqi, windtalker The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
c5150a3
into
pingcap:release-nextgen-202603
This is an automated cherry-pick of #66763
What problem does this PR solve?
Issue Number: ref #66762
Problem Summary:
Short MPP queries (below slow log threshold) are hard to correlate between TiDB dispatch logs and TiFlash task logs because SQL digest is not propagated in
mpp.TaskMeta.What changed and how does it work?
SQLDigesttokv.MPPDispatchRequest.StmtCtx.SQLDigest()in local MPP coordinator, log it in dispatch/retry/error paths, and carry it in dispatch requests.TaskMeta.SqlDigestin TiDB MPP client for dispatch/cancel/establish connection request metadata.replaceto the branch containingTaskMeta.sql_digest) and refresh Bazel dependency metadata viamake bazel_prepare.Check List
Tests
Validation commands run:
go test ./pkg/kv -run TestNonExistentgo test ./pkg/store/copr -run TestNonExistentgo test ./pkg/executor/internal/mpp -run TestNonExistentmake lintmake bazel_prepare(with writable local Bazel cache/output paths in this environment)Before this PR
After this PR, the sql digest is added to the logging
Side effects
Documentation
Release note
Summary by CodeRabbit
New Features
Chores