Write-Ahead Logging (WAL) & Durability
Write-Ahead Logging guarantees that transaction updates are flushed to an append-only log on disk before dirty page buffers are written to data files.
Checkpointing Note:
No checkpointing mechanism exists yet, so recovery currently replays the WAL from the beginning.
src/wal/manager.rs
rust
// WAL log record append sequence
let record = LogRecord::commit(tx_id);
wal_manager.append(&record)?;
wal_manager.fsync()?;