pub struct MaintenanceOpts {
pub sweep_spec: String,
pub reconcile_tick: Duration,
pub worker_poll: Duration,
pub wake_retry_backoff: Duration,
pub lock_ttl_secs: i64,
}Expand description
The chain’s tuning datums (assembly-level knobs, not structure — the schedule spec is the sweep cadence; the tick is the postgres staleness bound; the rest is the loop granularity).
The defaults: a 30-second sweep cadence (@every 30s), a
30-second reconcile tick, a 500 ms worker poll, a 1 s wake-restart
backoff, and a 30 s leader-lock TTL. Every value exists for the
tests’ short forms too — pass a MaintenanceOpts with the fields
set.
Fields§
§sweep_spec: StringThe @every spec the sweep schedule registers with
(schedule()’s v1 grammar).
reconcile_tick: DurationThe reconcile tick’s cadence — one Reactor::reconcile pass
per tick (the pinned driving mechanism; on postgres this tick
is the cache staleness’s real bound after a lost hint).
worker_poll: DurationThe worker claim loop’s poll cadence.
wake_retry_backoff: DurationThe supervised wake runner’s restart backoff (both stop
shapes; a fresh listen after the sleep).
lock_ttl_secs: i64The leader lock’s TTL seconds (try_lock — held across the
sweep; a sweep that outgrows the TTL lapses it silently and the
sweep’s own SweeperLock lease still serializes the stores).