March Docs

Conduit.Pruner

Conduit.Pruner — leader-only background task that batched-DELETEs terminal rows past their configured retention horizon.

Only the cluster leader runs prune ticks. Non-leaders skip every tick, so pruning never races across nodes and table locks stay short.

Each table is pruned in a loop: one batch DELETE per tick, repeated up to max_passes times per table per tick to avoid leaving a huge backlog after a long pause. The loop stops early when a batch returns 0 rows (caught up).

Functions

fnstartstart(storage : s, retention : Conduit.RetentionConfig) : Task(())#

Start the pruner as a background task.

Only the cluster leader executes prune ticks; non-leaders skip each interval.
Call this from Conduit.API.start when config.retention is Some.

Returns the task handle.  Keep it alive for the lifetime of the node.