Skip to main content

WalAdmin

Trait WalAdmin 

Source
pub trait WalAdmin:
    Send
    + Sync
    + 'static {
    // Required methods
    fn checkpoint(&self, path: &Path) -> Result<SnapshotMeta, LoraError>;
    fn wal_status(&self) -> Result<WalStatus, LoraError>;
    fn wal_truncate(&self, fence_lsn: u64) -> Result<(), LoraError>;
}
Expand description

Storage-agnostic admin surface for the WAL.

Database<InMemoryGraph> picks up the impl below when a WAL is attached.

Required Methods§

Source

fn checkpoint(&self, path: &Path) -> Result<SnapshotMeta, LoraError>

Take a checkpoint at path. The snapshot’s header is stamped with the WAL’s durable_lsn; older sealed segments are then dropped.

Source

fn wal_status(&self) -> Result<WalStatus, LoraError>

Snapshot of the WAL’s current state — durable / next LSN, active / oldest segment id. Cheap; a single WAL mutex acquisition.

Source

fn wal_truncate(&self, fence_lsn: u64) -> Result<(), LoraError>

Drop sealed segments at or below fence_lsn. Idempotent.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§