fix(store): use PASSIVE checkpoint to avoid file-shrink under concurrent readers
cbm_store_checkpoint() invoked SQLITE_CHECKPOINT_TRUNCATE, the most aggressive mode. When two cbm-mcp processes share a cache dir, one process's TRUNCATE can shrink files while another has them mmap'd, raising SIGBUS on macOS. PASSIVE never blocks readers and never ftruncate()s either file; SQLite still autocheckpoints in PASSIVE mode at 1000-page boundaries, so reclamation is unaffected for single-process users. Recommended by SQLite docs for shared databases: https://www.sqlite.org/pragma.html#pragma_wal_checkpoint
E
edwardmhughes committed
22153563cd1072b4f79e0e27113f6e0dea3abc1a
Parent: 093707c
Committed by Martin Vogel <martin.vogel@datadice.io>
on 5/10/2026, 7:10:27 PM