LSM-KV
- Role
- Solo — design, implementation, testing
- Context
- Personal systems project
- Stack
- C++17CMakeGoogleTestThreadSanitizerLinux perfCI
- Source
- arjitkulkarni/lsm-kv
A C++17 storage engine with skiplist memtables, Bloom-filtered SSTables, leveled compaction and crash recovery — built to understand durability by having to implement it.
- 01
Built the engine behind an abstract DB interface with RAII throughout, so lifetimes and ownership are enforced by the type system rather than by discipline.
- 02
Layered the read path: skiplist memtables in front, Bloom-filtered SSTables behind, leveled compaction to keep read amplification bounded, and an O(1) LRU block cache on top.
- 03
Made writes durable and fast at once with write-ahead logging and group-commit, then sharded memtables by hash to cut contention on the write path.
- 04
Separated concurrent read and write paths and implemented crash recovery from the WAL as a first-class code path, not an afterthought.
- 05
Validated it the way storage engines have to be validated: fault injection, ThreadSanitizer, GoogleTest coverage, CI automation, benchmarking and Linux profiling.
A working embedded store with durability guarantees that survive injected faults.
Concurrency bottlenecks identified through profiling rather than guesswork.
A test harness — fault injection plus TSan plus CI — that catches regressions in the paths that matter.
- LRU block cache
- O(0)LRU block cache
- Group-commit writes
- WALGroup-commit writes
- Race detection in CI
- TSanRace detection in CI
Concepts applied
- Memory management
- Synchronisation
- File I/O
- Caching & indexing
- Persistence
- Storage-engine design
Next project
03CIFAR-10 Transfer Learning