Expand description
Unified MVCC Version Chain Interface
This module defines the canonical interface for MVCC version chains across SochDB. Multiple implementations exist for different subsystems, but they share these traits.
§Implementations
| Implementation | Location | Use Case |
|---|---|---|
VersionChain | sochdb_core::epoch_gc | Epoch-based GC with VecDeque |
VersionChain | sochdb_storage::mvcc_snapshot | Snapshot-based visibility |
VersionChain | sochdb_storage::version_store | Generic key-value MVCC |
VersionChain | sochdb_storage::durable_storage | Binary-search optimized |
§Visibility Semantics
All implementations follow these MVCC visibility rules:
-
Read Committed: A version is visible if its creating transaction has committed before the reader’s start timestamp.
-
Snapshot Isolation: A version is visible if:
- It was committed before the reader’s snapshot timestamp
- It was not deleted, or deleted after the snapshot timestamp
-
Serializable (SSI): Adds read-write conflict detection on top of SI.
Structs§
- Version
Meta - Version metadata
- Visibility
Context - Version visibility context
Traits§
- Mvcc
Version Chain - Trait for MVCC version chain implementations
- Mvcc
Version Chain Mut - Trait for mutable version chain operations
- Write
Conflict Detection - Trait for detecting write conflicts