InvocationFuture long running operations #6248

Closed
pveentjer opened this Issue Sep 18, 2015 · 1 comment

Projects

None yet

1 participant

@pveentjer
Member

The invocation mechanism for blocking operations relies on a periodic timeout so that the operation gets retried. To prevent the calling thread (future.get thread) to wait indefnitely, it will periodically ask the isstillrunning service if the operation got lost.

To prevent a thread doing this check, the CONTINUE_WAIT is set on the future and the thread unsets it and skips the is still running. The problem is when there are multiple threads doing the future.get. One thread will be lucky and see the CONTINUE_WAIT. The other thread might by unlucky since the other thread has unset the CONTINUE_WAIT value and therefor this thread will continue with the is still running check. Since blocking operations always return false, this thread will conclude that the operation isn't running anymore and therefore it will throw an OperationTimeout.

Effectively it means that an InvocationFuture in Hazelcast can't be shared between multiple threads for blocking operations.

@pveentjer pveentjer modified the milestone: 3.6 Sep 18, 2015
@pveentjer pveentjer added this to the 3.7 milestone Nov 4, 2015
@pveentjer pveentjer self-assigned this Nov 4, 2015
@pveentjer
Member

This issue has been resolved in 3.7

@pveentjer pveentjer closed this May 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment