curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cameron McKenzie (JIRA)" <>
Subject [jira] [Commented] (CURATOR-308) SimpleDistributedQueue::take() hangs if container nodes are removed
Date Tue, 15 Mar 2016 21:46:33 GMT


Cameron McKenzie commented on CURATOR-308:

Thanks for the test case Philip,
The problem is as you've suggested, that when the last node is taken from the queue the parent
node is removed. When take() is called, it blocks indefinitely until a watch is fired. But
that watch will never fire because it wasn't placed correctly because the root path of the
queue has been removed. Thus, the take() method blocks forever.

I think that the best way to fix this is to revert to using createParentsIfNeeded() instead
of createParentContainersIfNeeded(), as we don't want the container functionality in this

> SimpleDistributedQueue::take() hangs if container nodes are removed
> -------------------------------------------------------------------
>                 Key: CURATOR-308
>                 URL:
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Recipes
>    Affects Versions: 3.1.0
>         Environment: org.apache.curator:curator-recipes 3.1.0
> org.apache.curator:curator-test 3.1.0
>            Reporter: Philip Searle
>         Attachments:
> SimpleDistributedQueue creates the queue using container nodes if the ZooKeeper instance
supports this feature. If ZooKeeper runs the container node cleanup task while SimpleDistributedQueue::take()
is blocking, the call will not ever return.
> A similar issue occurs when calling poll(), resulting in it delaying until the timeout
has elapsed, even if a queue item was inserted after the container cleanup occurs.

This message was sent by Atlassian JIRA

View raw message