curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cameron McKenzie (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CURATOR-254) TestBoundedDistributedQueue:testMulti fails intermittently
Date Wed, 26 Aug 2015 00:58:45 GMT

    [ https://issues.apache.org/jira/browse/CURATOR-254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14712280#comment-14712280
] 

Cameron McKenzie commented on CURATOR-254:
------------------------------------------

Perhaps this is an actual issue. There is a maximum bound of 10 items for the queue, but it
would seem that there's nothing providing synchronization between multiple producers for the
same queue. So, there is a window between the check for the number of items on the queue and
the insertion of data into the queue where it's possible for another producer to have come
along and create other items.

Locking is provided in the DistributedQueue class, but only to stop multiple consumers reading
the same message.

So, should the distributed queue be locking when creating messages? Obviously there's a performance
hit in doing this, but without it, there's no way to guarantee that the maximum queue size
will actually be respected.

> TestBoundedDistributedQueue:testMulti fails intermittently
> ----------------------------------------------------------
>
>                 Key: CURATOR-254
>                 URL: https://issues.apache.org/jira/browse/CURATOR-254
>             Project: Apache Curator
>          Issue Type: Bug
>    Affects Versions: 2.8.0
>            Reporter: Cameron McKenzie
>            Assignee: Cameron McKenzie
>            Priority: Blocker
>         Attachments: TEST-org.apache.curator.framework.recipes.queue.TestBoundedDistributedQueue.xml
>
>
> The TestBoundedDistributedQueue:testMulti fails intermittently. See attached test report.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message