-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
*: support capture evolve plan tasks #13199
Conversation
Co-Authored-By: Kenan Yao <cauchy1992@gmail.com>
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.
LGTM
Codecov Report
@@ Coverage Diff @@
## master #13199 +/- ##
===========================================
Coverage 80.7114% 80.7114%
===========================================
Files 471 471
Lines 116079 116079
===========================================
Hits 93689 93689
Misses 15293 15293
Partials 7097 7097 |
@@ -88,10 +96,13 @@ func Optimize(ctx context.Context, sctx sessionctx.Context, node ast.Node, is in | |||
bestPlanAmongHints = plan | |||
} | |||
} | |||
// If there is already a evolution task, we do not need to handle it again. | |||
if sctx.GetSessionVars().EvolvePlanBaselines && binding == nil { |
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.
If don't want to evolve baseline or there's existing binding, can we just break and return here?
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.
No, it needs to handle the case of UsePlanBaselines
.
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.
lgtm
/run-all-tests |
@lamxTyler merge failed. |
/run-integration-copr-test |
What problem does this PR solve?
Support capture evolve plan tasks, which will be used to evolve plan tasks in next pr.
What is changed and how it works?
In planner, when we found that the best plan is not in the baselines and option of evolvement has been turned on, it will cache the best plan in memory, and the background job will check the cache periodically and save it to store if there are any tasks.
Check List
Tests
Code changes
Side effects
Related changes
Release note