← Docs index

Reliability

Recoverable commits and checkpoints.

TriviumDB records changes in a CRC-protected write-ahead log and replays the safe prefix on startup. Transaction commits validate first, append a TxBegin/TxCommit batch, then apply to memory; checkpoint files are synced and published with atomic rename.

  1. Transaction validationDry-run check IDs, dimensions, payload size, and graph references before a transaction commit.
  2. WAL + CRCStore length-delimited bincode records with CRC32 so recovery can detect torn or corrupted tails.
  3. Safe-prefix replayPromote complete TxBegin/TxCommit batches, replay verified records, and truncate to a safe offset.
  4. Checkpoint renameWrite temporary checkpoint files, sync them, and publish with atomic rename.
  5. Sync modeWAL flush/fsync strength follows configuration: full, normal, or off.