Module version_chain

Module version_chain 

Source
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

ImplementationLocationUse Case
VersionChainsochdb_core::epoch_gcEpoch-based GC with VecDeque
VersionChainsochdb_storage::mvcc_snapshotSnapshot-based visibility
VersionChainsochdb_storage::version_storeGeneric key-value MVCC
VersionChainsochdb_storage::durable_storageBinary-search optimized

§Visibility Semantics

All implementations follow these MVCC visibility rules:

  1. Read Committed: A version is visible if its creating transaction has committed before the reader’s start timestamp.

  2. 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
  3. Serializable (SSI): Adds read-write conflict detection on top of SI.

Structs§

VersionMeta
Version metadata
VisibilityContext
Version visibility context

Traits§

MvccVersionChain
Trait for MVCC version chain implementations
MvccVersionChainMut
Trait for mutable version chain operations
WriteConflictDetection
Trait for detecting write conflicts

Type Aliases§

Timestamp
Logical timestamp type
TxnId
Transaction identifier type