pub async fn write_consolidated_frames<F: VfsFile>(
cx: &Cx,
wal: &mut WalFile<F>,
batches: &[TransactionFrameBatch],
) -> Result<usize>Expand description
Write a consolidated batch of frames to the WAL file.
Serializes all frames into a single contiguous buffer and writes it
in one write call, then fsyncs. This amortizes syscall overhead
and ensures all frames in the group become durable atomically.
Updates the WAL file’s running_checksum and frame_count for each
frame in the batch, maintaining the checksum chain invariant.
Returns the number of frames written.