curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shiliang Cao (JIRA)" <>
Subject [jira] [Commented] (CURATOR-233) Bug in double barrier
Date Mon, 25 Apr 2016 07:08:13 GMT


Shiliang Cao commented on CURATOR-233:

I don't know if I understood the design properly. Imagine this situation:

3 threads trying enter a double barrier, thread1 was late for about 20 seconds, thread2 and
thread3 retuned with false due to waiting timeout at 5 seconds, then finally thread1 entered
the barrier, should thread1 return false or true?

According the implementation, it returned true, but I think all threads entering same barrier
should return same value, don't know if it's a bug or by design?

> Bug in double barrier
> ---------------------
>                 Key: CURATOR-233
>                 URL:
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Recipes
>    Affects Versions: 2.8.0
>            Reporter: J D
>            Assignee: Mike Drob
>             Fix For: 2.10.1, 3.1.1
>         Attachments:,
> Hi,
> I think I discovered a bug in the internalLeave method of the double barrier implementation.
> When a client is told to leave the barrier after maxWait it does not do so. A flag is
set but the client does not leave the barrier, instead it keeps iterating through the control
loop and drives CPU usage to 100%.
> I have attached an example.
> Best regards
> Lianro

This message was sent by Atlassian JIRA

View raw message