How MVCC and Transactions Work in RocksDB
cppdashboard.dev/r/2026/08/how-mvcc-and-transactions-work-in-rocksdbRocksDB is built on an LSM-tree, which never modifies data in-place - every write creates a new version of the key. That's half of what you need to implement Multi-Version Concurrency Control ( MVCC ). Real-world databases serve many…
From the article
RocksDB is built on an LSM-tree, which never modifies data in-place - every write creates a new version of the key. That's half of what you need to implement Multi-Version Concurrency Control ( MVCC ).
Real-world databases serve many clients reading and writing the same data at the same time. The simplest way to make concurrent access safe is locking (think of a hash map protected with a mutex). This works from the correctness perspective, but makes readers and writers block each other, which can quickly become a performance bottleneck. MVCC solves this problem, allowing readers and writers to proceed concurrently. The idea is that:
Writers never modify or delete keys in-place, instead they create new versions of the keys
Share this resource