8000 fix: INT-001 for a user function that calls its own transaction (minigraf#886) by adityamukho · Pull Request #19 · project-minigraf/minigraf-c · GitHub
[go: up one dir, main page]

Skip to content

fix: INT-001 for a user function that calls its own transaction (minigraf#886) - #19

Merged
adityamukho merged 1 commit into
v3from
fix/886-reentrant-tx
Nov 12, 2026
Merged

adityamukho merged 1 commit into
v3from
fix/886-reentrant-tx

Conversation

@adityamukho
Copy link
Copy Markdown
Contributor

A user function that called execute, commit or rollback on the write transaction whose statement was running it hung: the transaction's execute holds its mutex for the whole statement, and the call locked it again on the same thread.

The transaction now records the thread running its statement and refuses a call from that thread with INT-001 before locking, as minigraf-node already does. A call from another thread still waits for the statement. minigraf_tx_rollback returns -1 in that case (it returned -1 only for NULL before); minigraf.h is regenerated.

Tests: the new tests hung before the fix (30 s guard) and pass with it. Codex review (gpt-6-astra): no findings.

Refs project-minigraf/minigraf#886

🤖 Generated with Claude Code

https://claude.ai/code/session_01H2a7QoSuGUZLujRE5TqLKJ

A transaction's execute holds its mutex for the whole statement, so a user
function of that statement that called execute, commit or rollback on the
same transaction locked it again on the same thread and hung. The
transaction now records the thread running its statement and refuses a call
from that thread with INT-001 before locking; a call from another thread
still waits for the statement.

Refs project-minigraf/minigraf#886

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H2a7QoSuGUZLujRE5TqLKJ
@adityamukho
adityamukho merged commit eb3c769 into v3 Nov 12, 2026
15 checks passed
@adityamukho
adityamukho deleted the fix/886-reentrant-tx branch November 12, 2026 08:13
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