Bind Node writes to one graph transaction - #47
Merged
Merged
Conversation
async_transaction_context opened a backend transaction but kept saving through the pool, so Node.create and connect committed immediately. graph_transaction now uses the transaction handle as the GraphContext database and as the task-local default.
Benchmark comparisonThreshold: ±25% (informational, does not block merge)
|
5 tasks
Benchmark comparisonThreshold: ±25% (informational, does not block merge)
|
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.
Summary
graph_transaction(db)opens the backend transaction, binds aGraphContextto that handle, and makes it the task-local default soNode.create/Node.connectparticipate.async_transaction_contextopened a transaction but kept writing through the pool, so a rollback could not undo graph rows. It is now an alias forgraph_transaction.begin/commit/rollbackraiseTransactionUnavailable.Test plan
tests/core/test_graph_transaction.py(commit, rollback, refuse)tests/db/test_postgres_integration.py::TestGraphTransactionagainst a live Postgres (skipped when DSN is down)