pub fn plan_range_catchup(
position: &RangeStreamPosition,
records: &[ChangeRecord],
) -> RangeCatchupPlanExpand description
Filter a slice of the shared logical stream (ascending by LSN) into the
catch-up plan for a single range, resuming from position. Only records
stamped for position.range_id, past its resume LSN, and clearing its
authority fence are selected; the returned resume position has been
advanced past them so a follower can persist it and continue.
The input is assumed LSN-ascending (the WAL is a sequential append log); records are visited in order so the resume position ratchets monotonically.