Skip to content

Helpful error message when nesting transactions in the same session #639

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

Merged

Conversation

zhenlineo
Copy link
Contributor

@zhenlineo zhenlineo commented Oct 23, 2019

Give helpful error message when nesting transactions in the same session.
Give helpful error message when accessing records on a result which has already been consumed with Result#consume or StatementRunner#close.

Updated some reactive example code to ensure the close is always closed.

@zhenlineo zhenlineo force-pushed the 4.0-nested-queries-with-reactive-session branch from 598671e to 466be5d Compare October 23, 2019 12:27
@zhenlineo zhenlineo closed this Oct 24, 2019
@zhenlineo zhenlineo reopened this Oct 24, 2019
Zhen Li added 3 commits October 30, 2019 18:14
…ion.

Session only support one active transaction (either auto-commit or exmplicit transaction) at a given time.

For async and blocking sessions, when we chaining a new transaction while there is an on-going auto-commit transaction, we can allow users to "nesting transactions" in one session by sending a pull all for the preceding auto-commit transaction.
However we cannot do the same for reactive sessions as project reactive will error if the underlying publisher does not respect back pressure.

Ensure helpful error message when accessing results after the statement runner where the results belongs to is closed.
@zhenlineo zhenlineo force-pushed the 4.0-nested-queries-with-reactive-session branch from 2c9c835 to 1110bdd Compare October 30, 2019 17:15
@zhenlineo zhenlineo merged commit ba5e5ac into neo4j:4.0 Nov 1, 2019
@zhenlineo zhenlineo deleted the 4.0-nested-queries-with-reactive-session branch November 1, 2019 08:48
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.

1 participant