Skip to main content

next_replication_chunk_len

Function next_replication_chunk_len 

Source
fn next_replication_chunk_len(
    pending: &[WalRecordWithOffset],
    max_batch_size: usize,
) -> usize
Expand 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.