Repository navigation
Run strict insertGraph() and upsertGraph() in a transaction (#429, #477) - #533
Merged
Merged
Conversation
lehni
enabled auto-merge (squash)
October 25, 2026 15:14
lehni
disabled auto-merge
October 25, 2026 15:21
lehni
force-pushed
the
feature/429-strict-atomic
branch
from
October 25, 2026 15:21
2440f24 to
b3a7cdf
Compare
lehni
enabled auto-merge (squash)
October 25, 2026 15:21
This was referenced Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Strict
insertGraph()andupsertGraph()(#429), including their*AndFetchvariants, now always run in a transaction. A database error in a later write, e.g. aUniqueViolationError, then leaves none of the earlier writes behind.upsertGraph(), the writes and the re-fetch of the*AndFetchvariants. Hooks get it ascontext.transaction.onError()handlers run after the rollback, on the query's own connection.context.transactionwait for the transaction, and deadlock on SQLite with its single connection, so they need to usecontext.transaction. The docs say so.Part of #477: non-strict graphs are unchanged, and making them atomic by default stays for the next major.