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: do not choose point get when exists read from tiflash hint. #17046

Closed

Conversation

lzmhhh123
Copy link
Contributor

@lzmhhh123 lzmhhh123 commented May 8, 2020

What problem does this PR solve?

Issue Number: close #16909

Problem Summary: do not choose point get when exists read from tiflash hint.

What is changed and how it works?

What's Changed: do not choose point get when exists read from tiflash hint.

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Integration test

Side effects

  • Performance regression
    • Consumes more CPU

Release note

  • Fix the wrong point get chosen when it exists read from TiFlash hint.

@lzmhhh123 lzmhhh123 added type/bugfix This PR fixes a bug. sig/planner SIG: Planner needs-cherry-pick-3.1 labels May 8, 2020
@lzmhhh123 lzmhhh123 requested a review from a team as a code owner May 8, 2020 12:03
@ghost ghost requested review from francis0407 and removed request for a team May 8, 2020 12:03
@sre-bot
Copy link
Contributor

sre-bot commented May 8, 2020

@lzmhhh123 lzmhhh123 changed the title Bug fix/ban point get tiflash hint planner: do not choose point get when exists read from tiflash hint. May 8, 2020
@lzmhhh123 lzmhhh123 requested review from winoros and zz-jason May 8, 2020 12:03
@lzmhhh123
Copy link
Contributor Author

/rebuild

@codecov
Copy link

codecov bot commented May 8, 2020

Codecov Report

Merging #17046 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #17046   +/-   ##
===========================================
  Coverage   80.0410%   80.0410%           
===========================================
  Files           520        520           
  Lines        141255     141255           
===========================================
  Hits         113062     113062           
  Misses        19240      19240           
  Partials       8953       8953           

Copy link
Member

@winoros winoros left a comment

Choose a reason for hiding this comment

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

lgtm

but, once the table actually doesn't have a tiflash replica. We'll fail to choose point get as well?

@lzmhhh123
Copy link
Contributor Author

lgtm

but, once the table actually doesn't have a tiflash replica. We'll fail to choose point get as well?

Yes, we have supported the CBO point get now.

@lzmhhh123
Copy link
Contributor Author

/rebuild

@lzmhhh123 lzmhhh123 added the status/LGT1 Indicates that a PR has LGTM 1. label May 28, 2020
ds.possibleAccessPaths[0] = path
ds.possibleAccessPaths = ds.possibleAccessPaths[:1]
if tiflashPath != nil {
ds.possibleAccessPaths = append(ds.possibleAccessPaths, tiflashPath)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why should we keep the tiflash path here? would the behavior be inconsistent with other hints like USE_INDEX? since those indexes are removed as well ignoring potential hints.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm afraid it will affect other index hints. Since the path has been filtered.

@ti-chi-bot
Copy link
Member

@lzmhhh123: 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/test-infra repository.

@ti-chi-bot ti-chi-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 23, 2021
@lzmhhh123 lzmhhh123 closed this Mar 26, 2021
@lzmhhh123 lzmhhh123 deleted the bug-fix/ban_point_get_tiflash_hint branch March 26, 2021 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. sig/planner SIG: Planner status/LGT1 Indicates that a PR has LGTM 1. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hint to read from tiflash doesn't work when the query is a PointGet
8 participants