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

Execute blocking tx functions in caller thread #420

Merged
merged 1 commit into from
Oct 19, 2017

Conversation

lutovich
Copy link
Contributor

This PR brings back blocking retry logic that performs retries in the caller thread and uses Thread#sleep() between retries. It is needed because blocking tx functions can't run in event loop as they perform blocking operations. Event loop thread can deadlock waiting for itself to read from the network. Previously code used a "hack" and executed given function in ForkJoinPool.commonPool().

Also added couple tests for retry logic and async transaction functions.

This commit brings back blocking retry logic that performs retries in
the caller thread and uses `Thread#sleep()` between retries. It is
needed because blocking tx functions can't run in event loop as they
perform blocking operations. Event loop thread can deadlock waiting for
itself to read from the network. Previously code used a "hack" and
executed given function in `ForkJoinPool.commonPool()`.

Also added couple tests for retry logic and async transaction functions.
@lutovich lutovich force-pushed the 1.5-tx-function-in-caller-thread branch from e246f31 to 28f288f Compare October 17, 2017 21:46
@lutovich lutovich merged commit 5ecb109 into neo4j:1.5 Oct 19, 2017
@lutovich lutovich deleted the 1.5-tx-function-in-caller-thread branch October 19, 2017 08:56
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