db-09 — References

Primary sources

Production engines that share this shape

Read-path correctness

  • Mark Callaghan, Read, write & space amplification, 2018 — explains why the "newest source wins" rule is required and how compaction trades read amplification for write amplification. https://smalldatum.blogspot.com/2018/09/read-write-and-space-amplification.html
  • Pebble's docs/rocksdb.md for an excellent diff-style walkthrough of how a modern engine differs from LevelDB while preserving the same correctness invariants.

Crash safety

  • Pillai, Chidambaram, et al., All File Systems Are Not Created Equal, OSDI '14. The "fsync the file, then fsync the directory" rule we follow for SST publish and MANIFEST rewrite comes from this work.

Cross-lab dependencies

  • db-03 (WAL) — record framing, torn-tail tolerance, WalIter.
  • db-05 (MemTable) — sorted map with explicit tombstones.
  • db-06 (SSTable) — on-disk sorted-string file format with a footer and trailing checksum.
  • db-08 (BlockCache + MergingIterator) — k-way merge with newer-source-wins and optional tombstone dropping; canonical SerializeStream used by Db::serialize_view.