fn next_replication_chunk_len(
pending: &[WalRecordWithOffset],
max_batch_size: usize,
) -> usizeExpand description
Returns the number of records for the next replication chunk.
pending is the ordered WAL tail and max_batch_size is the target command
cap. The returned length may exceed that cap only to keep records with the
same end_offset together, since they came from the same physical WAL
record and checkpoint advancement must stay atomic at that boundary.