curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Drob (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CURATOR-233) Bug in double barrier
Date Mon, 24 Aug 2015 14:30:45 GMT

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

Mike Drob commented on CURATOR-233:
-----------------------------------

Hi Lianro. I tried to convert your example into a unit test, which you can see at https://github.com/madrob/curator/commit/9f2f400eb9c0bcdc72defb4db017ceb5452c7b4a#diff-557f6b53f4b9e30b2abc3199b692f0ac

Unfortunately, this test does not reproduce your issue. This is the output that I see:

{noformat}
Configuring TestNG with: TestNG652Configurator
INFO  org.apache.curator.framework.imps.CuratorFrameworkImpl  Starting [main]
DEBUG org.apache.curator.CuratorZookeeperClient  Starting [main]
DEBUG org.apache.curator.ConnectionState  Starting [main]
DEBUG org.apache.curator.ConnectionState  reset [main]
INFO  org.apache.curator.framework.imps.CuratorFrameworkImpl  Starting [main]
DEBUG org.apache.curator.CuratorZookeeperClient  Starting [main]
DEBUG org.apache.curator.ConnectionState  Starting [main]
DEBUG org.apache.curator.ConnectionState  reset [main]
09:25:05: 0 trying to enter
09:25:05: 1 trying to enter
INFO  org.apache.curator.framework.state.ConnectionStateManager  State change: CONNECTED [main-EventThread]
INFO  org.apache.curator.framework.state.ConnectionStateManager  State change: CONNECTED [main-EventThread]
WARN  org.apache.curator.utils.ZKPaths  The version of ZooKeeper being used doesn't support
Container nodes. CreateMode.PERSISTENT will be used instead. [Thread-2]
09:25:05: 1 entered
09:25:05: 1 sleeping
09:25:05: 0 entered
09:25:05: 0 trying to leave
09:25:15: 1 woke up
09:25:15: 1 trying to leave
09:25:15: 0 left
09:25:15: 1 left
DEBUG org.apache.curator.framework.imps.CuratorFrameworkImpl  Closing [main]
DEBUG org.apache.curator.CuratorZookeeperClient  Closing [main]
DEBUG org.apache.curator.ConnectionState  Closing [main]
DEBUG org.apache.curator.framework.imps.CuratorFrameworkImpl  Closing [main]
DEBUG org.apache.curator.CuratorZookeeperClient  Closing [main]
DEBUG org.apache.curator.ConnectionState  Closing [main]
{noformat}

Can you provide more detail on the problem that you are seeing? Or look at my unit test code
and suggest where I strayed from your example?

Thanks,
Mike

> Bug in double barrier
> ---------------------
>
>                 Key: CURATOR-233
>                 URL: https://issues.apache.org/jira/browse/CURATOR-233
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Recipes
>    Affects Versions: 2.8.0
>            Reporter: J D
>             Fix For: 2.9.0
>
>         Attachments: DoubleBarrierClient.java, DoubleBarrierTester.java
>
>
> 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
(v6.3.4#6332)

Mime
View raw message