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

Fix prefix bug in key iterator and allow all versions #950

Merged
merged 1 commit into from
Aug 1, 2019

Conversation

jarifibrahim
Copy link
Contributor

@jarifibrahim jarifibrahim commented Jul 30, 2019

The key iterator is supposed to iterate over all versions of the same key
but the current implementation would iterate over all keys with the given prefix.
For example: A key iterator for "foo" would return true for "foo" and
"foobar". This commit fixes the issue.

This commit also sets the value of allVersions to true in the key iterator.
Fixes #943


This change is Reviewable

Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

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

The title and description of this PR does not say anything about the bug that's being fixed. That is the main focus here. The issue doesn't ask for AllVersions being set to true. I can see why that makes sense, but that's a secondary concern. Please change them before merging.

:lgtm:

Reviewed 1 of 1 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ashish-goswami)

The key iterator is supposed to iterate over all versions of the same key
but the current implementation would iterate over all keys with the prefix.
For example: A key iterator for "foo" would return true for "foo" and
"foobar". This commit fixes the issue.

This commit also sets the value of allVersions to true in the key iterator.
@jarifibrahim jarifibrahim force-pushed the ibrahim/keyonlyiterator branch from 054aa70 to 9d4e4ec Compare August 1, 2019 08:47
@jarifibrahim jarifibrahim changed the title Allow all version of keys in key only iteration Fix prefix bug in key iterator and allow all versions Aug 1, 2019
@jarifibrahim jarifibrahim merged commit a11c5e0 into master Aug 1, 2019
@jarifibrahim jarifibrahim deleted the ibrahim/keyonlyiterator branch August 1, 2019 13:53
jarifibrahim pushed a commit that referenced this pull request Aug 9, 2019
The key iterator is supposed to iterate over all versions of the same
key but the current implementation would iterate over all keys with the 
given prefix. For example, A key iterator for "foo" would return true
for "foo" and "foobar". This commit fixes the issue.

This commit also sets the value of `allVersions` to true in the key 
iterator.
jarifibrahim pushed a commit that referenced this pull request Mar 12, 2020
The key iterator is supposed to iterate over all versions of the same
key but the current implementation would iterate over all keys with the 
given prefix. For example, A key iterator for "foo" would return true
for "foo" and "foobar". This commit fixes the issue.

This commit also sets the value of `allVersions` to true in the key 
iterator.

(cherry picked from commit a11c5e0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

unexpected Valid() == true for Single Key iteration
3 participants