Skip to main content

decompose_diff_to_frames

Function decompose_diff_to_frames 

Source
pub fn decompose_diff_to_frames(
    diff: &GraphSnapshotDiff,
    timestamp_ns: u64,
    base_seq: u64,
) -> Result<(Vec<WALFrame<Value>>, u64), StorageError>
Expand description

Convert a GraphSnapshotDiff into WAL frames ready for persistence.

timestamp_ns is the wall-clock at diff time. base_seq is the WAL cursor; returned frames have frame_seq values starting at base_seq + 1.

Returns (frames, next_seq) where next_seq is the highest assigned frame_seq.