-
-
Notifications
You must be signed in to change notification settings - Fork 178
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Add range queries to Db and DbInner. I'm thinking we'll copy RocksDB's interface, which has a db.iter() and iter.seek() API.
At a high level, I think this work involves a few things:
- Creating a snapshot manager that creates, updates, and deletes snapshots from the manifest.
- Cloning the current DB state, including the memtables and wal data structures. This will be needed for the iterator, so it has a consistent point in time to iterate over all data (both in-memory and on disk/obj storage). I'm thinking this might be included as part of the snapshot manager (i.e. each snapshot in the manager will be a full
Dbwith a state at a point in time). - Creating a user-facing
DbIteratorthat merges the wal, memtable, and L0+ SSTs into a single iterator similar toMergeIterator. We might be able to useMergeIteratordirectly, I need to check. This iterator interface should have aseek()method. - Update the
Dbobject to have a.iterator()method that returns aDbIterator.
For (3), I suspect if we use MergeIterator, we'll need a DbMergeIterator (similar to TwoMergeIterator) that takes iterators for wals, memtables, and SSTs (because of the Rust typing issue mentioned here
I don't plan to tackle prev() in this issue.
flaneur2020 and alexsward
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request