Publishing an arrangement couples its compaction to the importing runtime's drain
rate: a shared trace applies the meet of what its controller stream asked for and
what the readers hold, so a slow importer keeps maintenance from shedding history.
Before this the coupling was invisible, and would first show up as a memory
incident.
`Shared`'s state gains `writer_logical`, the frontier the writer asked for before
the holds were met into it, written in the same critical section as the applied
frontier so the pair is always consistent. `Published::logical_frontiers` returns
both, and `ArrangementSharingRegistry::hold_gaps` walks a worker's slots for the
largest difference, deduplicating by point because aliases share their target's.
Two per-worker gauges carry it: `mz_compute_shared_arrangement_hold_gap_ms` is the
largest gap over the arrangements a worker publishes, and
`mz_compute_shared_arrangement_held_count` how many are held at all. Only the
maintenance runtime reports, since only it is held back and both runtimes resolve
the same process-wide registry.
Measured on an 8-worker replica under continuous churn: zero with no reader, and a
peak of one compaction round with 31 arrangements held while 509 interactive joins
ran over the published index.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015tLhSbZdXrTSK2KwSocT59
Publishing an arrangement couples its compaction to the importing runtime's drain rate: a shared trace applies the meet of what its controller stream asked for and what the readers hold. Before this the coupling was invisible and would first surface as a memory incident.
mz_compute_shared_arrangement_hold_gap_msis the largest gap, over the arrangements a worker publishes, between the frontier the controller asked for and the one the holds let the trace apply.mz_compute_shared_arrangement_held_countis how many are held at all. Reported from the maintenance runtime alone, so theinteractiveseries stays at zero and asumormaxover the label stays correct.Zero is the healthy reading: both runtimes get the same
AllowCompaction, so an interactive runtime that drains promptly leaves the two frontiers equal. Measured on an 8-worker replica under continuous churn, the gauges read zero with no reader and peaked at one compaction round with 31 arrangements held while 509 interactive joins ran over the published index.🤖 Generated with Claude Code
https://claude.ai/code/session_015tLhSbZdXrTSK2KwSocT59