-
Notifications
You must be signed in to change notification settings - Fork 6k
planner: fix get wrong cost with cost tracer (#61196) #61218
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
planner: fix get wrong cost with cost tracer (#61196) #61218
Conversation
@hawkingrei This PR has conflicts, I have hold it. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release-8.5 #61218 +/- ##
================================================
Coverage ? 57.1221%
================================================
Files ? 1777
Lines ? 630621
Branches ? 0
================================================
Hits ? 360224
Misses ? 246179
Partials ? 24218
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
/retest |
/unhold |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AilinKid, hawkingrei The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest-required |
[LGTM Timeline notifier]Timeline:
|
/retest-required |
local test can succeed for TestQ22, unit test is ok |
/retest-required |
/test unit-test |
@AilinKid: No presubmit jobs available for pingcap/[email protected] In response to this:
Instructions 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. |
/retest |
83f754e
to
6f19c98
Compare
/retest |
1 similar comment
/retest |
Signed-off-by: ti-chi-bot <[email protected]>
Signed-off-by: AilinKid <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: AilinKid <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
6f19c98
to
f942210
Compare
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
/retest |
Signed-off-by: Weizhen Wang <[email protected]>
Signed-off-by: Weizhen Wang <[email protected]>
This is an automated cherry-pick of #61196
What problem does this PR solve?
Issue Number: close #61155
Problem Summary:
When we use the cost trace's explain, it will calculate the cost twice. Unfortunately, when calculating secondly, the row count has been polluted by the first.
the first calculation:
1500000000
will become the5.645217633333338e+07
, becausepostOptimize
‘stryEnableLateMaterialization
can change therow count
in the first plan generate.tidb/pkg/planner/core/tiflash_selection_late_materialization.go
Lines 283 to 290 in 7419112
the second calculation:
So two formats have different costs.
What changed and how does it work?
Generate the cost trace in the first calculation. Remove the second calculation.
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.