mirror of
https://github.com/versity/versitygw.git
synced 2026-09-22 16:04:15 +00:00
Service the overflow list during normal operation: the worker publishes and clears it after every channel job, so a burst that exceeds the channel buffer drains as soon as the sink recovers instead of accumulating until shutdown. Make dispatch and the drain sweep share one critical section. An append either lands before the sweep and is drained, or runs after the worker exited and publishes inline; the check-then-send window that could strand a record between the two is closed. Request publications use the same boundary with drop semantics: once the drain finished, no owner can guarantee the sinks are still open, so the record is dropped rather than published. Never close the metrics datapoint channel. The forwarder exits through the canceled context after draining the buffer, the closed flag turns late producers into drops, and no send can race a closure. Implement the new Manager method in the test mock.