Master the fundamental concepts of build a simple key-value store through this focused micro-challenge.
Multi-version concurrency control stores several values for one key tagged with sequence or timestamp. Readers observe a snapshot without blocking writers; writers append new versions. PostgreSQL heap tuples and RocksDB with column families use variants of this idea.
Map key to sorted list of (seq, value) pairs. Read picks latest version with seq <= read_snapshot.
cLoading…
min_active_snapshot for retention policyKeep the relevant documentation open while you implement. When your output disagrees with the reference, trace one failing case by hand before changing random lines.
You will implement simplified MVCC get/put with snapshot reads. This exercise requires a reader at snapshot S not to see writes committed after S.
Write a C program that implements a simplified MVCC key-value store.
Requirements:
Three hints are available for this task, revealed one at a time inside the code workspace so you can struggle productively before seeing them.
All starter code and reference implementations are available for your local setup.
View on Github