-
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
util/ranger: fix incorrect behavior about index who has prefix column #8851
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/run-all-tests tikv=release-2.1 pd=release-2.1 tidb-test=release-2.1 |
winoros
changed the title
[DNM] for binary building
util/ranger: fix incorrect behavior about index who has prefix column
Dec 28, 2018
zz-jason
reviewed
Dec 28, 2018
LGTM |
alivxxx
previously approved these changes
Dec 29, 2018
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 tikv=release-2.1 pd=release-2.1 tidb-test=release-2.1 |
…nto ranger-simple-fix
zz-jason
approved these changes
Dec 29, 2018
winoros
added a commit
to winoros/tidb
that referenced
this pull request
Dec 29, 2018
winoros
added a commit
to winoros/tidb
that referenced
this pull request
Dec 29, 2018
zz-jason
pushed a commit
that referenced
this pull request
Dec 29, 2018
yu34po
pushed a commit
to yu34po/tidb
that referenced
this pull request
Jan 2, 2019
winkyao
pushed a commit
that referenced
this pull request
Jan 2, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
priority/P1
The issue has P1 priority.
sig/planner
SIG: Planner
status/LGT2
Indicates that a PR has LGTM 2.
type/bugfix
This PR fixes a bug.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Previously, when one index has a prefix column, we'll convert an open interval to a closed one. e.g.
col < aaaaaa and col > aaaaaa
will become(-inf, aaa], [aaa, +inf)
(if the prefix len is 3).However when sending requests to tikv. We need to promise that the ranges need to be ordered and no intersection. In
(-inf, aaa], [aaa, +inf)
,[aaa, aaa]
is intersected in both interval, it will cause error arose whenaaa
is the exact the place that that data before and after it lies in different regions.What is changed and how it works?
Enhance the check, only we'll change the interval only when the last index column is cut.
Do a range merging if a cut is performed.
Check List
Tests
Side effects
Related changes
fix the range information built from index who has prefix column, it may cause tikv panic in a very rare situation
This change is