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§
Sourcefn checkpoint(&self, path: &Path) -> Result<SnapshotMeta, LoraError>
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.
Sourcefn wal_status(&self) -> Result<WalStatus, LoraError>
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.