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.
- Transaction validationDry-run check IDs, dimensions, payload size, and graph references before a transaction commit.
- WAL + CRCEach record is framed as length + bincode + CRC32, so recovery can tell an unfinished tail from real corruption.
- Safe-prefix replayReplay complete TxBegin/TxCommit batches and drop an unfinished tail. A corrupted complete frame fails the open and keeps the log intact.
- Checkpoint renameWrite temporary checkpoint files, sync them, and publish with atomic rename.
- Sync modeWAL flush/fsync strength follows configuration: full, normal, or off.