pub(crate) const UNORDERED_SCAN_MARGIN: Duration;Expand description
How far before the newest unordered event already ordered the ordering task starts its next scan.
Every unordered event is deleted once ordered, and a key-value store keeps the deletion as a tombstone until compaction, so a scan of the whole unordered prefix walks every event ordered since then and its cost grows with the client’s event volume. Unordered ids are wall-clock based and transactions commit in any order, so an event can only become visible after newer ones were ordered by as long as its transaction stayed open; the margin covers that, the periodic full scan below covers the rest.