Fix error during_commit tracking in auto-commit transactions#49
Merged
robsdedude merged 2 commits intomasterfrom Feb 12, 2026
Merged
Fix error during_commit tracking in auto-commit transactions#49robsdedude merged 2 commits intomasterfrom
during_commit tracking in auto-commit transactions#49robsdedude merged 2 commits intomasterfrom
Conversation
After `RUN` has successfully been sent, the server might commit the transaction at any time (but no later than when the result stream has been fully consumed). Therefore, any disconnect (i/o error) that occurs after an auto-commit's `RUN` has been sent, must be considered to have happened `during_commit`. This most notably affects `Neo4jError::is_retryable`.
There was a problem hiding this comment.
Pull request overview
Adjusts auto-commit execution so that connectivity errors occurring after the RUN message has been sent are treated as happening during_commit, which affects retryability (Neo4jError::is_retryable) and overall transaction correctness.
Changes:
- Refactors
RecordStream::run()control flow so auto-commit errors afterRUNis sent get wrapped via commit-uncertainty handling. - Fixes a doc comment typo/formatting issue in
RetryPolicydocs. - Adds a changelog entry documenting the auto-commit commit-uncertainty fix.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
neo4j/src/driver/record_stream.rs |
Refactors auto-commit run() flow to ensure disconnects after RUN are considered during_commit (but currently introduces a compile issue). |
neo4j/src/driver/session/retry.rs |
Doc comment fix (“if” missing). |
CHANGELOG.md |
Documents the auto-commit during_commit behavior fix (entry needs wording tweak). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
After
RUNhas successfully been sent, the server might commit the transaction at any time (but no later than when the result stream has been fully consumed).Therefore, any disconnect (i/o error) that occurs after an auto-commit's
RUNhas been sent, must be considered to have happenedduring_commit. This most notably affectsNeo4jError::is_retryable.