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
checkpoint/verify/rebuild_indexes on a thread holding a WriteTransaction deadlock instead of INT-001 #734
Minigraf::checkpoint, verify and rebuild_indexes take inner.write_lock without the is_write_tx_active() check that execute, query, fact_log and begin_write make. Called on a thread that holds a WriteTransaction, they lock a std::sync::Mutex the same thread already holds: a deadlock (or a panic, as std leaves same-thread re-locking unspecified), instead of INT-001.
let db = Minigraf::open("x.graph")?;let tx = db.begin_write()?;
db.checkpoint()?;// hangs
main (v2.x): checkpoint_inner (src/db.rs:729); verify/rebuild_indexes are v3-only
Minigraf::prepare, PreparedQuery::execute and PreparedQuery::query also skip the check. They take no write lock, so they do not deadlock, but they are inconsistent with execute/query.
Fix
Add the is_write_tx_active() → INT-001 check to each, with a test per method. Found while reviewing the #180 spec (PR #730), whose re-entry rules depend on these guards.
Activity
docs(spec): #180 review: #734 guards, registry snapshot is new, uniff…
docs(plan): #734 branch starts after the plan merges
docs(#734): INT-001 names PreparedQuery's methods apart; note the blo…
test(#734): note the blocked thread on a deadlock
fix(db): checkpoint inside a WriteTransaction returns INT-001 instead…
Merge pull request #739 from project-minigraf/fix/734-tx-guards
adityamukho commentedon Oct 24, 2026
Fixed on
v3in #739 (7f90e95) and onmainin #740 (b3b3975). Stays open until the v2.x patch with the fix is published.release: v2.0.11
adityamukho commentedon Oct 26, 2026
Fixed in v2.0.11, now published: https://github.com/project-minigraf/minigraf/releases/tag/v2.0.11. The v2.x fix shipped in #740; v3.0.0 is also fixed in #739. Updated the pinned known-issues list (#421).