Expand description
Multi-version storage backend for OLTP traffic. Implements the MultiVersionStore family of traits from
core::interface::store so the engine can read at a snapshot, write a new version, and step backwards through
history without coordinating with concurrent readers.
The backend is tiered: hot writes land in the in-memory buffer, the flusher migrates them to persistent storage at commit boundaries, and the garbage collector reclaims versions that have aged out behind the configured retention. The persistent tier is pluggable - a SQLite-backed implementation is the default but the trait surface is what the engine binds to, so other backends can be slotted in.
Invariant: a row at version V is the value visible to a reader whose snapshot is >= V and where no later
version exists at V' <= snapshot. Commit must publish all deltas of a transaction atomically with respect to
readers; partial visibility breaks snapshot isolation.
Modules§
- config
- flush
- Background flusher that migrates writes from the buffer tier to the persistent tier. Flush is the watermark-coupled eviction sweep: on each tick (or explicit request) it persists the latest-<=W value per key of every persistent shape, then drops all <=W versions from the commit tier, bounding the commit tier’s RAM.
- gc
- Garbage collection. Three reclamation strategies cover the cases the multi-version store generates: historical reclaims versions older than the active read watermark; row reclaims tombstones once no reader can see the pre-tombstone version; operator handles per-flow retention overrides where some operators keep less history than the global default.
- memory
- sqlite
- store
- tier