VectorClockData
VectorClockData =
Readonly<Record<ReplicaId,number>>
Defined in: src/persistence/replicated/VectorClock.ts:24
Vector clock — a logical timestamp per replica that captures the “happens-before” relation between events across nodes.
For each pair of clocks a, b:
- a < b (“a happens-before b”) iff every component of
ais<= b’s and at least one is strictly less. - a == b iff every component is equal.
- Otherwise the events are concurrent — neither preceded the other, and a conflict resolver decides what wins.
Used by ReplicatedEventSourcedActor to recognise concurrent edits to the same persistenceId from different replicas, and by the ConflictResolver plug-in to merge those concurrent events deterministically.
Wire shape: a plain Record<ReplicaId, number>. Empty
components are treated as 0, so omitting them is fine for
compactness on the wire.