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

Michi Mutsuzaki commented on ZOOKEEPER-1062:
--------------------------------------------

Thanks for the patch Botond, it looks good to me overall. I have 2 comments:

- Replace tabs with spaces.
- The code to check if end_timeval is smaller than or equal to curr_timeval 
could be written more compactly like this:

{noformat}
+            if (end_timeval.tv_sec < curr_timeval.tv_sec ||
+                (end_timeval.tv_sec == curr_timeval.tv_sec &&
+                 end_timeval.tv_usec <= curr_timeval.tv_usec)) {
{noformat}

> Net-ZooKeeper: Net::ZooKeeper consumes 100% cpu on wait
> -------------------------------------------------------
>
>                 Key: ZOOKEEPER-1062
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1062
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: contrib-bindings
>    Affects Versions: 3.3.1, 3.4.5, 3.4.6
>            Reporter: Patrick Hunt
>            Assignee: Botond Hejj
>              Labels: patch
>             Fix For: 3.4.7, 3.5.0
>
>         Attachments: ZOOKEEPER-1062.patch
>
>
> Reported by a user on the CDH user list (user reports that the listed fix 
> addressed this issue for him): 
> "Net::ZooKeeper consumes 100% cpu when "wait" is used. At my initial 
> inspection, it seems to be related to implementation mistake in 
> pthread_cond_timedwait."
> https://rt.cpan.org/Public/Bug/Display.html?id=61290



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to