-
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
executor: fix the wrong order by pk desc
result and some corner cases for unsigned pk
#10179
Conversation
…es for unsigned pk
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
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 |
/run-all-tests |
/run-common-test |
/run-common-test |
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 comments of
type tableResultHandler struct {
// If the pk is unsigned and we have KeepOrder=true.
// optionalResult handles the request whose range is in signed int range.
// result handles the request whose range is exceed signed int range.
// Otherwise, we just set optionalFinished true and the result handles the whole ranges.
optionalResult distsql.SelectResult
result distsql.SelectResult
optionalFinished bool
}
should be updated?
HighVal: ranges[idx].HighVal, | ||
HighExclude: ranges[idx].HighExclude, | ||
}) | ||
if !(ranges[idx].LowVal[0].GetUint64() == math.MaxInt64 && ranges[idx].LowExclude) { |
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.
Why do we need this check?
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.
Because there can be cases like (maxInt64, maxInt64]
and [maxInt64+1, maxInt64+1)`. And then error thrown when send requests.
Codecov Report
@@ Coverage Diff @@
## master #10179 +/- ##
================================================
- Coverage 77.9301% 77.9269% -0.0033%
================================================
Files 407 407
Lines 82964 82911 -53
================================================
- Hits 64654 64610 -44
+ Misses 13514 13510 -4
+ Partials 4796 4791 -5 |
/run-all-tests |
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
Please cherry-pick this to the release-2.1 branch. |
…es for unsigned pk (pingcap#10179)
What problem does this PR solve?
fix #10178
What is changed and how it works?
When split ranges, we forget to check the
DESC
status and some corner case checking.Check List
Tests
Related changes