Linora

0703. Compaction claims, tail counters, write order and retention

Status: Accepted (2026-11-27). Implements the compactor part of 0010; narrow write to pages.tail_* (otherwise realtime-owned, 0021). Tail counters amended by 0705: the clamp did not commute with late realtime flushes, and overlapping jobs could double-subtract. Decrements are now exact and signed, saves compare-and-swap on snapshot_seq, and quiet pages reconcile to 0. Qualifying rules extended by 0312: a third counter, tail_deletes, and a delete rule for large snapshots.

Context

ADR 0010 sets the thresholds and retention, but not how a job is claimed without blocking realtime, how the realtime-maintained tail_ops/tail_bytes counters are reset, or how readers stay safe while files and rows are written.

Decision

Alternatives

Consequences