Skip to main content

Module wal

Module wal 

Source
Expand description

Write-Ahead Log — append-only log for crash recovery.

WAL entry format on disk:

[length: u32][lsn: u64][type: u8][page_id: u64][compressed_data: ...][crc32: u32]
  • length — byte count of the payload (lsn + type + page_id + compressed_data).
  • compressed_data — the data portion compressed with LZ4.
  • crc32 — checksum over the entire payload.

Structs§

Wal
Append-only write-ahead log.
WalEntry
A single WAL entry (in-memory representation).

Enums§

WalEntryType
WAL entry type discriminant.

Type Aliases§

Lsn
Log Sequence Number.