Skip to content

Conversation

@injectives
Copy link
Contributor

@injectives injectives commented Nov 4, 2021

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.

Fixes: #1019

@injectives injectives marked this pull request as draft November 4, 2021 22:44
@injectives injectives force-pushed the feature/tx branch 7 times, most recently from 3830fc5 to f78d692 Compare November 8, 2021 16:06
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.
@injectives injectives changed the title Ensure reactive transaction function gets rolled back on cancellation Make UnmanagedTransaction return ongoing tx completion stage Nov 8, 2021
@injectives injectives marked this pull request as ready for review November 8, 2021 20:02
Copy link
Contributor

@michael-simons michael-simons left a comment

Choose a reason for hiding this comment

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

Makes sense.

@injectives injectives merged commit 5b12efe into neo4j:4.4 Nov 9, 2021
@injectives injectives deleted the feature/tx branch November 9, 2021 11:08
injectives added a commit to injectives/neo4j-java-driver that referenced this pull request Nov 11, 2021
)

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.
injectives added a commit to injectives/neo4j-java-driver that referenced this pull request Nov 11, 2021
)

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.
injectives added a commit that referenced this pull request Nov 11, 2021
* Make UnmanagedTransaction return ongoing tx completion stage (#1057)

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.

* Call close with the appropriate flag to commit or rollback on UnmanagedTransaction where possible to avoid double state acquisition (#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
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.

RxSession.close on Flux.cancel produces an error

2 participants