Skip to main content

WalBatchWriter

Trait WalBatchWriter 

Source
pub trait WalBatchWriter: Send + Sync {
    // Required methods
    fn append_batch(&self, requests: &[&CommitRequest]) -> Result<Vec<u64>>;
    fn sync(&self) -> Result<()>;
}
Expand description

Batch WAL writer abstraction for the group commit coordinator.

A single append_batch call writes all frames from all valid requests in one sequential write(), and sync issues exactly one fsync.

Required Methods§

Source

fn append_batch(&self, requests: &[&CommitRequest]) -> Result<Vec<u64>>

Append commit frames for every request in the batch. Returns a WAL offset per request.

Source

fn sync(&self) -> Result<()>

Issue a single fsync (or fdatasync) covering all appended frames.

Implementors§