Skip to content

Fix error during_commit tracking in auto-commit transactions#49

Merged
robsdedude merged 2 commits intomasterfrom
fix/auto-commit-retires
Feb 12, 2026
Merged

Fix error during_commit tracking in auto-commit transactions#49
robsdedude merged 2 commits intomasterfrom
fix/auto-commit-retires

Conversation

@robsdedude
Copy link
Owner

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.

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`.
@robsdedude robsdedude requested a review from Copilot February 12, 2026 10:10
@robsdedude robsdedude marked this pull request as ready for review February 12, 2026 10:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 after RUN is sent get wrapped via commit-uncertainty handling.
  • Fixes a doc comment typo/formatting issue in RetryPolicy docs.
  • 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.

@robsdedude robsdedude enabled auto-merge (squash) February 12, 2026 10:46
@robsdedude robsdedude merged commit a2316b9 into master Feb 12, 2026
14 checks passed
@robsdedude robsdedude deleted the fix/auto-commit-retires branch February 12, 2026 11:25
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.

2 participants