Task · TSO-0076

Debounce checkpoint writes across collectors

Description

Every checkpoint Set re-marshals and double-fsyncs the entire shared JSON file (internal/collector/checkpoint.go:178-183, 223-229); dozens of tailnets x window collectors approaches a full-file fsync per second, painful on NFS/EFS-backed volumes. Add a short debounce/coalesce window collapsing same-instant ticks into one write, without weakening the durability contract for shutdown or the finalize-in-one-call semantics. Note the HA design (TSO-0033) may introduce a kubernetes checkpoint backend - keep the seam compatible.

Acceptance Criteria

Definition of Done

Implementation Plan

Root F1 freezes checkpoint write debounce with zero preserving synchronous writes; lane C later implements coalescing and shutdown flush.

Implementation Notes

Lane C added file-store write debounce/coalescing with zero preserving synchronous behavior, retained the option after corrupt-file recovery, and wired synchronous cursor/evidence Flush into Run and Close shutdown paths. Concurrent-set and root shutdown-persistence tests passed.

Final Summary

Debounced concurrent checkpoint writes into one persisted update, retained synchronous shutdown flushes, and bounded and documented the crash-loss window. Implementation SHA 6d9c23c. Final integrated just check passed at 5b55617; exact-head CI run 33354208183 completed success.

View the source file on GitHub