8000 fix(db): checkpoint inside a WriteTransaction returns INT-001 instead of deadlocking (#734) — backport by adityamukho · Pull Request #740 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

fix(db): checkpoint inside a WriteTransaction returns INT-001 instead of deadlocking (#734) — backport - #740

Merged
adityamukho merged 2 commits into
mainfrom
fix/734-tx-guards-main
Oct 24, 2026
Merged

adityamukho merged 2 commits into
mainfrom
fix/734-tx-guards-main

Conversation

@adityamukho
Copy link
Copy Markdown
Collaborator

Backport of #739 to v2.x.

  • checkpoint on a thread that holds a WriteTransaction locked the write lock that the transaction already held, and hung. It now returns INT-001, as execute and begin_write do.
  • prepare and PreparedQuery::execute get the same check, for consistency.
  • verify, rebuild_indexes and PreparedQuery::query don't exist on v2.x.

Tests: tests/write_tx_guard_test.rs (4 tests, each under a 30 s timeout). Bench machine: 1,321 passed, 9 ignored. Clippy clean.

#734 stays open until the v2.x patch with this fix is published.

🤖 Generated with Claude Code

https://claude.ai/code/session_015NBT2Yx9JUQKYvv2CvC9py

adityamukho and others added 2 commits October 24, 2026 13:11
… of deadlocking (#734) — backport

checkpoint locked the write lock its own thread's WriteTransaction held.
prepare and PreparedQuery::execute get the same guard for consistency.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015NBT2Yx9JUQKYvv2CvC9py
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015NBT2Yx9JUQKYvv2CvC9py
@codecov
codecov Bot commented Oct 24, 2026
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@adityamukho
adityamukho merged commit b3b3975 into main Oct 24, 2026
16 checks passed
@adityamukho
adityamukho deleted the fix/734-tx-guards-main branch October 24, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0