You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Close-time save ignores wal_checkpoint_threshold(usize::MAX) #476
The SyncMode::Normal docs (src/db.rs) say that wal_checkpoint_threshold(usize::MAX) means "no per-write flush, no auto-checkpoint, and no close-time checkpoint (the same sentinel also suppresses that)".
Inner::drop does skip its checkpoint for that sentinel. But PersistentFactStorage::drop (src/storage/persistent_facts.rs) calls save() whenever the storage is dirty, so closing the handle still writes every pending fact to the .graph file. The WAL is left next to it, and all of its entries are already checkpointed.
Reproduce
let o = || OpenOptions::new().synchronous(SyncMode::Normal).wal_checkpoint_threshold(usize::MAX);{let db = Minigraf::open_with_options(&p,o()).unwrap();
db.execute("(transact [[:e0 :a0 1]])").unwrap();
db.execute("(transact [[:e0 :a0 2]])").unwrap();}// drop// On reopen, replay_wal sees last_checkpointed_tx_count = 2, so the drop saved.
Decide
Either:
make the sentinel suppress the save in PersistentFactStorage::drop too, as documented. Benchmarks and bulk loaders rely on that to keep WAL entries pending.
Activity
test(db): cover the in-memory arm of the #476 drop path
Merge pull request #526 from project-minigraf/fix/476-sentinel-drop-save
adityamukho commentedon Oct 10, 2026
Fixed on v3 by #526 (bc7a6b6).
Merge pull request #540 from project-minigraf/fix/457-476-v2-backport
Merge pull request #541 from project-minigraf/docs/457-476-backport-note
adityamukho commentedon Oct 11, 2026
Backported to v2.x in #540 (merged to
main, 99410b1); ships in the next v2.x patch release.release: v2.0.5
ci(bench): compare each run with the last 30 runs, not all history (#568