Skip to main content

snapshot_position_bytes

Function snapshot_position_bytes 

Source
pub fn snapshot_position_bytes(snapshot_lsn: u64) -> Bytes
Expand description

Encodes the bootstrap snapshot boundary as a 16-byte source-position [ snapshot_lsn (8 BE) | u64::MAX (8 BE) ], matching the CDC source’s [ commit_lsn | in-transaction offset ] encoding.

Padding the offset with u64::MAX preserves the exact handover boundary: a CDC transaction whose commit_lsn == snapshot_lsn (already contained in the snapshot) stays suppressed, while every transaction committing after the snapshot is delivered. See issue #599.