References — db-05 LSM MemTable

Primary sources

Skip lists

Alternative data structures

  • Bw-tree (Microsoft, 2013): lock-free B+ tree variant used in Hekaton.
  • Adaptive Radix Tree (ART, 2013): compact, cache-friendly trie used by HyPer and DuckDB. https://db.in.tum.de/~leis/papers/ART.pdf
  • Masstree (Mao, Kohler, Morris, 2012): trie-of-B+trees, very fast for variable length keys.

Tombstones and snapshot reads

  • RocksDB DeleteRange. Tombstones over key ranges, important for prefix deletes. https://github.com/facebook/rocksdb/wiki/DeleteRange

  • LevelDB sequence numbers. Each MemTable entry is internally tagged with a 56-bit sequence and 8-bit type byte; this lab simplifies to just the type byte. See db/dbformat.h kValueTypeForSeek.

Real-world tunings

  • Cassandra: uses Memtable with off-heap allocators; flushed to SSTables on size, time, or commit-log pressure.
  • HBase: MemStore per column family; configurable via hbase.hregion.memstore.flush.size.
  • InfluxDB IOx & TimescaleDB: apply LSM ideas to time-series, with time-bucketed MemTables.

Further reading