Engine: live
LevelDB and RocksDB, inside
How a log-structured merge tree keeps its data: a write-ahead log, sorted immutable SST files on levels, and a MANIFEST that says which file is where. Drop a database's files and see them, or read how the formats work.
File viewerDrop SST files, the MANIFEST and the log: every block and entry, the levels of the tree, every write batch. Nothing is uploaded.The formatsThe LSM tree, SST blocks and prefix compression, internal keys and sequence numbers, the footer, the log and the MANIFEST.
Start here
- Open the sample database: a music catalogue RocksDB wrote, 3,364 entries in 3 SST files on two levels, with a write-ahead log.
- The MANIFEST view shows the tree. Click the L0 file
000011.sstand find deletion, merge and wide-column entity entries. - Click the index in the file layout, then a data block: the grey part of each key is shared with the key before it.
- Open the
.logfile: the writes that are not in any SST yet.
Also coming
CockroachDB stores its data in Pebble, an LSM tree in the same family. A CockroachDB section will read Pebble's table formats and decode CockroachDB's keys (table, index, columns) and MVCC timestamps.