You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Full /x-overhaul audit across all src/ subsystems (10 parallel reviews).
Nine subsystems were clean; three findings fixed:
- HIGH db: get() could resurrect a range-deleted key. A single memtable
flush split into multiple L0 SSTs numbers files by user key, not
sequence, and a range tombstone is written only to the file holding
its start key. The L0 get() loop scanned newest-first and early-
returned on the first matching point entry, before visiting the
lower-numbered file carrying the covering tombstone -- so get()
returned a stale value while iter() correctly returned nothing. The L0
branch now pre-scans all tombstone-bearing L0 files before any point
lookup, matching the L1+ and iterator paths.
- LOW compaction: trivial-move was permanently unreachable because the
always-on lazy-delete wrapper makes options.compaction_filter always
Some. Added a defaulted CompactionFilter::is_noop(); LazyDeleteFilter
reports no-op when no user filter is set and no dead keys are
registered, so single-file Ln->Ln+1 moves skip the rewrite again.
- LOW types: module-header doc now documents the trailer bit-inversion,
matching the struct doc and the actual encoding.
make fmt + clippy -D warnings clean; full debug + release suites pass.
Copy file name to clipboardExpand all lines: docs/audit.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,9 +55,9 @@
55
55
-**What**: Comment uses "Safety:" but no unsafe block is involved.
56
56
-**Reason**: Comment is a design note, not a safety justification. Cosmetic only.
57
57
58
-
### [LOW] db: point-lookup `get` path scans all L1+ files with range deletions
58
+
### [LOW] db: point-lookup `get` path scans all L0 + L1+ files with range deletions
59
59
-**Where**: src/db.rs (get path), src/iterator/
60
-
-**What**: The point-lookup `get` path iterates ALL L1+ files that have range deletions to check for covering tombstones — O(files_with_range_dels). The iterator path bounds this by checking `smallest_key > upper_bound` to skip files entirely past the range, but the point-lookup path cannot apply the same optimization since range tombstones can extend past a file's largest key.
60
+
-**What**: The point-lookup `get` path iterates ALL L0 and L1+ files that have range deletions to check for covering tombstones — O(files_with_range_dels). The iterator path bounds the L1+ portion by checking `smallest_key > upper_bound` to skip files entirely past the range, but the point-lookup path cannot apply the same optimization since range tombstones can extend past a file's largest key. The L0 branch must pre-scan every tombstone-bearing L0 file before any point lookup because a single split flush numbers its files by key, not sequence, so a tombstone can live in a different L0 file than the keys it covers.
61
61
-**Reason**: This is an inherent limitation of range tombstones combined with point lookups. The cost is bounded by the number of tombstone-bearing files (typically small in practice), and the alternative (maintaining a separate tombstone index) would add write-path complexity disproportionate to the benefit.
62
62
63
63
### [LOW] types: `InternalKey` panics on malformed encoded data
0 commit comments