Skip to content

VersionLog

VersionLog is the optional history layer behind AkkEngine::history(), AkkEngine::getAt(), AkkEngine::rollbackKey(), and AkkEngine::rollbackTo().

Enable it when you need point-in-time reads, audit-style per-key history, or rollback support. Leave it disabled for workloads that only need the latest value and want the smallest write path.

CapabilityContract
Per-key historyEvery committed mutation can be inspected as a VersionEntry.
Point-in-time readgetAt(key, seq) resolves the visible value at or before an engine sequence.
RollbackrollbackKey() and rollbackTo() restore state by appending new mutations; old history is not rewritten.
CompressionValues can be stored with opt-in Zstd compression while public reads return decompressed bytes.
SegmentationHistory can rotate into .akvlog segments with derived .akvidx sidecars.
RetentionClosed segments can be pruned by age or sequence while synthetic base entries preserve the retained boundary state.
Parallel write lanesPARALLEL admission can persist history through independently locked lane segments.
DiagnosticsStats expose recovery, sidecar, retention, and parallel queue signals.
GoalPage
Enable history, inspect VersionEntry, and call rollback APIsVersionLog Usage
Understand write path, files, sidecars, recovery, retention, and Blob interactionVersionLog Architecture
Monitor production health, interpret counters, and run maintenance toolingVersionLog Operations

VersionLog is authoritative only for historical values and rollback decisions. The current value path still goes through the normal MemTable, WAL, SST, Blob, and optional Cluster components.

Derived sidecar indexes are optimization files. A missing or corrupt .akvidx sidecar does not make valid .akvlog data unreadable; VersionLog safely falls back to scanning the authoritative segment and attempts to rebuild sidecars during recovery, rotation, clean close, and maintenance tooling.

Blob GC remains incompatible with enabled VersionLog because old history may still reference previous blob values. Retention can reduce VersionLog segments, but it is not a Blob GC policy by itself.