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

Set the Prefix option during iteration #2780

Merged
merged 2 commits into from
Nov 26, 2018
Merged

Conversation

manishrjain
Copy link
Contributor

@manishrjain manishrjain commented Nov 26, 2018

Badger now has a new way to iterate over a certain prefix. This is done by setting a new Prefix option in IteratorOptions. This option makes it faster to Seek over the iterator, by not including any table which does not overlap with the provided prefix.

Also, Badger has a NewKeyIterator, which additionally uses the bloom filters to further remove tables from the candidate set, during iterator creation. Use that during newList.


This change is Reviewable

@manishrjain manishrjain merged commit 87d66e2 into master Nov 26, 2018
@manishrjain manishrjain deleted the mrjn/bring-badger branch November 26, 2018 21:29
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request Jul 19, 2019
Badger now has a new way to iterate over a certain prefix. This is done by setting a new `Prefix` option in `IteratorOptions`. This option makes it faster to Seek over the iterator, by not including any table which does not overlap with the provided prefix.

Also, Badger has a `NewKeyIterator`, which additionally uses the bloom filters to further remove tables from the candidate set, during iterator creation. Use that during `newList`.

Commits:

* Bring in Badger's prefix change during iterator creation.
* Use NewKeyIterator during posting list creation.
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.

1 participant