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: Return exact prefix match from memory iterator #48

Merged
merged 2 commits into from
Jan 30, 2025

Conversation

AndrewSisley
Copy link
Collaborator

Relevant issue(s)

Resolves #27

Description

Returns exact prefix match from memory iterator, matching the badger behaviour.

Also removes some dead code I accidentally left in from a previous PR.

Sorry, this should have been removed in an earlier PR and I missed it.
@AndrewSisley AndrewSisley added this to the CoreKV v0.1 milestone Jan 30, 2025
@AndrewSisley AndrewSisley requested a review from a team January 30, 2025 19:24
@AndrewSisley AndrewSisley self-assigned this Jan 30, 2025
@@ -22,9 +22,6 @@ type iterator struct {
// The key at which this iterator ends, inclusive.
end []byte

// If this is true, `start` is inclusive, else `start` is exclusive.
isStartInclusive bool
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@fredcarle Sorry as I pushed back on doing this in an earlier PR as I thought this would be more involved than this and require cleanup in badger, however the badger code that I thought was trying to do this was trying to do something else instead and this change was fairly easy.

Copy link
Member

@shahzadlone shahzadlone left a comment

Choose a reason for hiding this comment

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

LGTM

@AndrewSisley AndrewSisley merged commit 10de2f4 into sourcenetwork:main Jan 30, 2025
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.

Memory prefix iterator does not return self
2 participants