-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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: Select-For-Update should skip the FastPlan #54773
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
[LGTM Timeline notifier]Timeline:
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AilinKid 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 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #54773 +/- ##
=================================================
- Coverage 72.8103% 55.6828% -17.1275%
=================================================
Files 1553 1676 +123
Lines 437420 610601 +173181
=================================================
+ Hits 318487 340000 +21513
- Misses 99331 247258 +147927
- Partials 19602 23343 +3741
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@hawkingrei: The following tests failed, say
Full PR test history. Your PR dashboard. 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/test-infra repository. I understand the commands that are listed here. |
@@ -883,7 +883,7 @@ func TryFastPlan(ctx base.PlanContext, node ast.Node) (p base.Plan) { | |||
ctx.GetSessionVars().PlanColumnID.Store(0) | |||
switch x := node.(type) { | |||
case *ast.SelectStmt: | |||
if x.SelectIntoOpt != nil { | |||
if x.SelectIntoOpt != nil || x.LockInfo != 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.
The lock operations of point get and batch point get are push down. The original design of selectLockExec was only for cop reads that cannot be pushed down.
TryFastPlan
is designed be used to generate point/batch point get plans with for update.
The issue is not a high priority one by now, better to resolve the plan display issue after some proper executor builder and transaction state refactor.
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.
so it's barely a explained issue, not the correctness one, right? 😂
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.
Yes the correctness one is #54652.
The severity of #54705 is moderate, there is also related behaviour fix checking lock is needed or not
in https://github.com/pingcap/tidb/pull/54738/files#diff-359d434f5527f2d2157554bb9081bdc497f25e0a76253907fb5c9d1bdfb9b233L770.
PR needs rebase. 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. |
What problem does this PR solve?
Issue Number: close #54705
Problem Summary:
What changed and how does it work?
select ... for update
should skip theFastPlan
.Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.