-
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
planner: simplify plan cache for fast point get #53094
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #53094 +/- ##
================================================
+ Coverage 72.4215% 74.8226% +2.4010%
================================================
Files 1490 1491 +1
Lines 428984 432166 +3182
================================================
+ Hits 310677 323358 +12681
+ Misses 99041 88954 -10087
- Partials 19266 19854 +588
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/test check-dev2 |
@qw4990: Cannot trigger testing until a trusted user reviews the PR and leaves an 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. |
) | ||
|
||
if plan, _ok := p.(*PointGetPlan); _ok { | ||
ok = IsPointGetWithPKOrUniqueKeyByAutoCommit(sctx.GetSessionVars(), p) |
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.
In the new code logic, don't we need to check "IsPointGetWithPKOrUniqueKeyByAutoCommit" ?
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, this check is unnecessary for Plan Cache, we only need to check whether the Plan is *PointGetPlan.
@@ -1708,7 +1708,7 @@ func TestFixControl33031(t *testing.T) { | |||
tk.MustExec(`set @a = 1`) | |||
tk.MustQuery(`execute stmt using @a`).Check(testkit.Rows("1 1")) | |||
require.False(t, tk.Session().GetSessionVars().FoundInPlanCache) | |||
tk.MustQuery(`show warnings`).Check(testkit.Rows("Warning 1105 skip plan-cache: plan rebuild failed, Fix33031 fix-control set and partitioned table in cached Point Get plan", "Warning 1105 skip plan-cache: plan rebuild failed, Fix33031 fix-control set and partitioned table in cached Point Get plan")) |
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.
2 duplicated warnings, after this PR, no such duplication.
[LGTM Timeline notifier]Timeline:
|
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AilinKid, elsa0520, hawkingrei, time-and-fate 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 |
/test check-dev2 |
@qw4990: Cannot trigger testing until a trusted user reviews the PR and leaves an 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. |
/test check-dev2 |
@qw4990: Cannot trigger testing until a trusted user reviews the PR and leaves an 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. |
This reverts commit 50b8dfa.
What problem does this PR solve?
Issue Number: ref #50618
Problem Summary: planner: simplify plan cache for fast point get
What changed and how does it work?
planner: simplify plan cache for fast point get
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.