FugueGcCoordinator

class FugueGcCoordinator<V>(state: StateFlow<Fugue<V>>, cutFrontier: StateFlow<CutFrontier>, delivered: StateFlow<VersionVector>, applyCompaction: (Patch<Fugue<V>>) -> Unit, scope: CoroutineScope) : ScopedCloseable

Coordinator that drives tombstone GC for a Fugue CRDT replicated via Quilter, gated by the eviction-safe causal-stability barrier (ADR-003 addendum v3, #262).

Mirrors RgaGcCoordinator exactly, substituting Fugue for Rga and FugueOp.Compact for RgaOp.Compact.

Role

The Fugue op-log grows without bound unless tombstones are periodically garbage-collected, but a tombstoned Insert(I, …) cannot be purged while a concurrent Insert(J, parent=I) minted by a different author may still exist undelivered — purging I would leave J's subtree unreachable. The sound condition is causal stability, not a scalar watermark.

Quilter publishes the two version-vector quantities the barrier needs:

Parameters

state

live Fugue state (updated by Quilter on every incoming delta).

cutFrontier

the atomically-published causal-stability cut + frontier from Quilter.cutFrontier.

delivered

this replica's contiguous delivered VV from Quilter.deliveredLocal.

applyCompaction

called with each compaction Patch; the caller wires this to Quilter.apply so the delta propagates to all peers.

scope

the CoroutineScope for background coroutines.

See also

Constructors

Link copied to clipboard
constructor(state: StateFlow<Fugue<V>>, cutFrontier: StateFlow<CutFrontier>, delivered: StateFlow<VersionVector>, applyCompaction: (Patch<Fugue<V>>) -> Unit, scope: CoroutineScope)

Functions

Link copied to clipboard
override fun close()