-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix table.Smallest/Biggest and iterator Prefix bug #997
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
Conversation
The pick table compares the smallest and biggest key of each table against the iteratorOptions.Prefix. The smallest and biggest key contain timestamps while the prefix does not contains timestamp. So pickTable would return not return the correct tables. For example Table has Smallest [0 255 255... ] and prefix [0, 0, 1], the comparison of these two values would return true implying that the smallest is greater than the prefix which is incorrect because prefix doesn't contains a timestamp and smallest does. With this commit, we compare the smallest/biggest keys without timestamps to the opt.Prefix. See #992 for more details.
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.
✅ A review job has been created and sent to the PullRequest network.
@jarifibrahim you can click here to see the review status or cancel the code review job.
|
Just fixed this in #983 |
|
Just check why travis is failing for Go1.11. |
manishrjain
left a comment
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.
Did you add a test covering the bug, @jarifibrahim ?
Reviewable status: 0 of 4 files reviewed, all discussions resolved (waiting on @manishrjain)
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.
Thank you for updating the comment and finding this bug. I have no additional feedback for this PR.
Reviewed with ❤️ by PullRequest
|
@manishrjain Added a regression test. |
The test for checksum mismatch was failing but I reran and it passed. Looks like we have a flaky test. |
The pick table compares the smallest and biggest key of each table against the iteratorOptions.Prefix. The smallest and biggest key contain timestamps while the prefix does not contains timestamp. So pickTable would not return the correct tables. For example Table has Smallest [0 255 255... ] and prefix [0, 0, 1], the comparison of these two values would return true implying that the smallest is greater than the prefix which is incorrect because prefix doesn't contains a timestamp and smallest does. With this commit, we compare the smallest/biggest keys without timestamps to the opt.Prefix. See #992 for more details. (cherry picked from commit 5f64ecf)
The pick table compares the smallest and biggest key of each table
against the iteratorOptions.Prefix. The smallest and biggest key contain
timestamps while the prefix does not contain a timestamp. So pickTable
would return not return the correct tables.
For example
Table has Smallest [0 255 255... ] and prefix [0, 0, 1], the comparison
of these two values would return true implying that the smallest is
greater than the prefix which is incorrect because prefix doesn't
contains a timestamp and smallest does.
With this commit, we compare the smallest/biggest keys without
timestamps to the opt.Prefix.
Fixes #992
This change is