diff --git a/README.md b/README.md index b3d4e50..bbceb51 100644 --- a/README.md +++ b/README.md @@ -68,20 +68,18 @@ The disk format is stable as of 1.0.0. Future breaking changes will result in a major version bump and a migration path. +## Run unit benchmarks + +```bash +cargo bench --features bloom,lz4,miniz +``` + ## License All source code is licensed under MIT OR Apache-2.0. All contributions are to be licensed as MIT OR Apache-2.0. -## Development - -### Run benchmarks - -```bash -cargo bench --features bloom --features lz4 --features miniz -``` - ## Footnotes [1] https://rocksdb.org/blog/2017/05/12/partitioned-index-filter.html diff --git a/src/memtable/mod.rs b/src/memtable/mod.rs index b0abb51..07f9b20 100644 --- a/src/memtable/mod.rs +++ b/src/memtable/mod.rs @@ -71,16 +71,16 @@ impl Memtable { // NOTE: This range start deserves some explanation... // InternalKeys are multi-sorted by 2 categories: user_key and Reverse(seqno). (tombstone doesn't really matter) // We search for the lowest entry that is greater or equal the user's prefix key - // and has the highest seqno (because the seqno is stored in reverse order) + // and has the seqno (or lower) we want (because the seqno is stored in reverse order) // // Example: We search for "abc" // // key -> seqno // // a -> 7 - // abc -> 5 <<< This is the lowest key (highest seqno) that matches the range + // abc -> 5 <<< This is the lowest key (highest seqno) that matches the key with seqno=None // abc -> 4 - // abc -> 3 + // abc -> 3 <<< If searching for abc and seqno=4, we would get this // abcdef -> 6 // abcdef -> 5 //