Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport UnmanagedTransaction stage and completion improvements #1069

Merged
merged 2 commits into from
Nov 11, 2021

Conversation

injectives
Copy link
Contributor

Cherry-picks: #1057, #1065.

)

This update ensures that `UnmanagedTransaction` returns existing on-going tx completion stage when a similar request is made. For instance, if it was requested to be rolled back and then requested to be closed, both invocations should get the same on-going stage. In addition, it should not accept conflicting actions, like committing and rolling back at the same time.

In addition, it makes sure that cancellation on reactive transaction function results in rollback.
…edTransaction where possible to avoid double state acquisition (neo4j#1065)

* Call close with the appropriate flag to commit or rollback on UnmanagedTransaction where possible to avoid double state acquisition

Calling `close` instead of separate `isOpen` and `commitAsync` requires less lock acquisitions and is safer.

* Update tests
@injectives injectives merged commit 2912037 into neo4j:4.3 Nov 11, 2021
@injectives injectives deleted the feature/fixes branch November 11, 2021 14:42
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