VersionVector

@Serializable
data class VersionVector(val entries: Map<ReplicaId, Long> = emptyMap())

A per-author high-water version vector: replicaId → highest contiguous seq.

Distinct from DotContext: a VersionVector is the dense prefix only — no cloud, no gap-holding. It models the causal-stability quantities of ADR-003 addendum v3 (#262):

  • the compactor's own contiguous delivered VV,

  • the stable cut S = min over live peers,

  • the frontier F = max(F_live, retainedFrontier).

Absent authors read as 0 (get); the vector is sparse — only positive high-waters are stored.

Constructors

Link copied to clipboard
constructor(entries: Map<ReplicaId, Long> = emptyMap())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

the backing map; never holds a 0 or negative value.

Functions

Link copied to clipboard

Elementwise max with other — the frontier/merge operation (F = max over peers).

Link copied to clipboard
fun contains(dot: Dot): Boolean

True if this vector dominates the single dot (author, seq)get(author) >= seq.

Link copied to clipboard

True if every author's high-water in other is at or below this vector's.

Link copied to clipboard

Elementwise min with other — the stable-cut operation (S = min over peers).

Link copied to clipboard
operator fun get(author: ReplicaId): Long

The high-water seq for author, or 0 if this vector has never seen it.