Skip to content

Do not retry transaction when it is terminated #223

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
merged 2 commits into from
Mar 23, 2017

Conversation

lutovich
Copy link
Contributor

This PR makes transaction functions Session.readTransaction() and Session#writeTransaction() not retry when executed transaction was explicitly terminated by the user. Such termination can happen when Session#close() is called or killQuery procedure is used.

Transaction termination can result in two different status codes on the server, both classified as transient errors which is not entirely correct. So we need additional status code checks in the retying code.

@lutovich lutovich force-pushed the 1.2-no-retry-when-terminated branch 7 times, most recently from 5f68f71 to 111ab2b Compare March 22, 2017 23:02
This commit makes transaction functions `Session.readTransaction()` and
`Session#writeTransaction()` not retry when executed transaction was
explicitly terminated by the user. Such termination can happen when
`Session#close()` is called or `killQuery` procedure is used.

Transaction termination can result in two different status codes on the
server, both classified as transient errors which is not entirely correct.
So we need additional status code checks in the retying code.
@lutovich lutovich force-pushed the 1.2-no-retry-when-terminated branch from 111ab2b to c31eab6 Compare March 22, 2017 23:10
@lutovich lutovich force-pushed the 1.2-no-retry-when-terminated branch from 6d66592 to 28a4e95 Compare March 23, 2017 01:12
@zhenlineo
Copy link
Contributor

LGTM.

@lutovich lutovich merged commit 2e078e6 into neo4j:1.2 Mar 23, 2017
@lutovich lutovich deleted the 1.2-no-retry-when-terminated branch March 23, 2017 09:21
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