Skip to content
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: reset plan id before optimizing point get (#14471) #14595

Merged
merged 2 commits into from
Feb 3, 2020

Conversation

djshow832
Copy link
Contributor

@djshow832 djshow832 commented Feb 3, 2020

Conflicting files:
planner/core/point_get_plan_test.go

What problem does this PR solve?

Plan id is reset before optimization every time, so that ids of operators are the same when physical plans are the same.
But when the plan is a point get, the plan id is not reset, leading to different ids of PointGet, so plan digests are different.
If the plan digest are different, statement summary can't work properly. Refer to issue #14432

What is changed and how it works?

Reset plan id before tryFastPlan and add test cases.

Check List

Tests

  • Unit test

Code changes

N/A

Side effects

  • Breaking backward compatibility

Related changes

N/A

Release note

  • Fix the bug that plan ids in point get may change every time. It should be always 1.

@eurekaka
Copy link
Contributor

eurekaka commented Feb 3, 2020

Build failed, PTAL

@djshow832
Copy link
Contributor Author

Build failed, PTAL

Addressed, PTAL again.

Copy link
Contributor

@eurekaka eurekaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@AilinKid AilinKid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eurekaka
Copy link
Contributor

eurekaka commented Feb 3, 2020

/merge

@sre-bot sre-bot added the status/can-merge Indicates a PR has been approved by a committer. label Feb 3, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Feb 3, 2020

/run-all-tests

@sre-bot sre-bot merged commit b33e1a2 into pingcap:release-3.0 Feb 3, 2020
@bb7133 bb7133 added this to the v3.0.10 milestone Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/planner SIG: Planner status/can-merge Indicates a PR has been approved by a committer. type/performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants