fix(core): harden fusion.db pragmas against mid-write crashes
Switch synchronous from NORMAL to FULL and restore the default wal_autocheckpoint of 1000 (was 100). The aggressive checkpoint cadence + NORMAL fsync left a wide window for torn pages whenever a writer crashed mid-checkpoint, which is exactly what happened when node:sqlite SIGSEGV'd inside pager_write and corrupted the production db. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
5
.changeset/fusion-db-synchronous-full.md
Normal file
5
.changeset/fusion-db-synchronous-full.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@runfusion/fusion": patch
|
||||
---
|
||||
|
||||
Harden `fusion.db` against process crashes: switch `PRAGMA synchronous` from `NORMAL` to `FULL` and restore the default `wal_autocheckpoint = 1000` (was 100). Repeated node:sqlite SIGSEGVs inside `pager_write` had been corrupting the db; the previous settings left a wide window for torn pages whenever a writer crashed mid-checkpoint. The small fsync cost is worth the durability win.
|
||||
Reference in New Issue
Block a user