WindowPolicy

fun interface WindowPolicy

Policy that decides which element ids to truncate from an us.tractat.kuilt.crdt.Rga sequence.

RgaGcCoordinator calls idsToTruncate on every compaction pass (i.e. each time the causal-stability watermark advances). The returned ids are added to the GC set and broadcast as part of the us.tractat.kuilt.crdt.RgaOp.Compact delta.

Convergence. Different replicas may run different WindowPolicy configurations. After set-union merge the more-aggressive window dominates: each replica compacts the union of what either dropped. This "most-aggressive-window-wins" behaviour is expected and convergent.

Built-in factories

See also

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun idsToTruncate(sequence: List<RgaId>, tombstones: Set<RgaId>): Set<RgaId>

Returns the set of element ids to drop from the sequence on this compaction pass.