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 edge case for iterating over tombstoned value #63

Merged
merged 3 commits into from
Apr 30, 2024
Merged

Conversation

yzang2019
Copy link
Collaborator

@yzang2019 yzang2019 commented Apr 30, 2024

Describe your changes and provide context

Currently, if the starting key is tombstoned, iterator will still return a valid value with TOMBSTONE, which is incorrect.

The correct logic should be to check whether the first value is a TOMBSTONE flag, if so, we should call nextForward or nextReverse to move onto the next valid key, which will correctly handle and filter out all TOMBSTONE values.

Testing performed to validate your change

Added unit test to cover this edge case

@yzang2019 yzang2019 requested review from codchen and Kbhat1 April 30, 2024 05:30
@yzang2019 yzang2019 changed the title Fix edge case for iterate tombstoned value Fix edge case for iterating over tombstoned value Apr 30, 2024
@yzang2019 yzang2019 merged commit 38789cb into main Apr 30, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants