Build an LSM-Tree Storage Engine

memtables, SSTables and compaction

Challenge 5 of Storage & CachingAdvanced~70 min

Build the storage engine behind modern databases: an in-memory memtable that flushes to immutable sorted string tables, reads that merge newest-first across levels, tombstone deletes, and compaction.

5 steps

  1. 1The Memtable
  2. 2Flushing to an SSTable
  3. 3Merged Reads, Newest Wins
  4. 4Tombstone Deletes
  5. 5Compaction
Start step 1