mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-26 16:28:15 +00:00
686b39bbef
`LiveEventHistory::snapshot_since` resumed from the oldest retained event whenever a consumer's cursor pointed before it, without signaling that the in-between events had been evicted from the ring buffer. Cursor-based consumers therefore assumed the returned batch was contiguous with their cursor and silently lost events. Add a `gap` flag to `LiveEventBatch`, set when the consumer's cursor is older than the oldest retained sequence, so consumers can detect the loss and trigger a full re-sync or alert. Add a regression test that fills and evicts past the ring-buffer capacity and asserts a lagging cursor reports `gap = true` (and that contiguous/caught-up cursors do not). Refs rustfs/backlog#969