-
Notifications
You must be signed in to change notification settings - Fork 6.1k
topsql: move fast plan check to beginning of observeStmtBeginForTopSQL when disable top sql #60605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Welcome @VGalaxies! |
|
Hi @VGalaxies. Thanks for your PR. I'm waiting for a pingcap 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. |
|
Hi @VGalaxies. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
pkg/executor/adapter.go:2162
- Ensure that the early return when a fast plan is detected does not bypass any essential logging or metric updates that might be needed for diagnostic purposes in production.
if (!topsqlstate.TopSQLEnabled() && IsFastPlan(a.Plan)) {
|
/ok-to-test |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: crazycs520, lance6716 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:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #60605 +/- ##
================================================
+ Coverage 73.0969% 73.4986% +0.4017%
================================================
Files 1715 1715
Lines 475094 475135 +41
================================================
+ Hits 347279 349218 +1939
+ Misses 106453 104552 -1901
- Partials 21362 21365 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
In response to a cherrypick label: new pull request created to branch |
…L when disable top sql (pingcap#60605) close pingcap#60604
What problem does this PR solve?
Issue Number: close #60604
Problem Summary: see #60604
What changed and how does it work?
The fast plan check is now performed at the very beginning of observeStmtBeginForTopSQL. This change skips the expensive GetPlanDigest call when TopSQL is disabled and the execution plan is a fast path, since point gets return early and the plan digest is only cached without further use.
For this optimization to take effect, TopSQL, slow log, and statement summary must be disabled.
Check List
Tests
before:
after (no
GetPlanDigestfound in flame graph):in our special edition of TiDB, sysbench point select QPS can have 2~3% increment
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.