Skip to content

Reverse iterators start off-by-one. #44

@palkeo

Description

@palkeo

If I instantiate a reverse iterator like so:

            leveldb
                .iter(ReadOptions::new())
                .reverse()
                .from(start_key)
                .to(stop_key)

The first key it yields is the a key that's not in the [stop_key, start_key] range, but is actually the first one after start_key.

Example: if my db has keys ["a", "c", "e", "g"] and start_key is "d", stop_key is "a".
Then the first key yielded is "e", which is outside of the "d"->"a" range I am asking.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions