Context
Store Buffers accumulate entries until they are safely materialized in the corresponding Forward Buffer.
If truncation occurs out of order, data durability gaps may occur during recovery.
A deterministic rule is required to determine when entries may be safely removed from Store Buffers.
Decision
Truncation is allowed only for the maximal contiguous confirmed prefix.
The Cursor Tracker maintains:
next_to_send_offsethighest_contiguous_committed_offset
Only entries with offsets <= committed_offset may be truncated.
Consequences
Benefits:
- deterministic recovery after crash
- no durability gaps
- replication loops remain stateless beyond cursor tracking
Tradeoffs:
- occasional backlog if a single entry cannot be confirmed
- cursor tracking infrastructure required