Skip to content

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.

@lutovich lutovich requested a review from zhenlineo October 16, 2017 13:15
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