{"id":"btree-wal-three-phase-commit","text":"The B-tree WAL commit follows a strict three-phase protocol: (1) write WAL entries + fsync, (2) fsync data file via `page_manager.sync()`, (3) truncate WAL + fsync WAL fd — crash-safe at every interleaving because WAL entries are physical page images making replay idempotent.","truth_value":"IN","source":"entries/2026/05/29/topic-crash-recovery-invariants.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"explanation":{"steps":[{"node":"btree-wal-three-phase-commit","truth_value":"IN","reason":"premise"}]}}