Mahadev konar commented on ZOOKEEPER-622:

this looks like a critical problem. This could cause setwatches never to be set 
if the count is initialized to 0 for all the three watches. We should 
definitely have a test  case for this. How about setting a watch on a zookeeper 
server and shutting it down and making sure that the watch gets fired on the 
second server it reconnects to? 

> Test for pending watches in send_set_watches should be moved
> ------------------------------------------------------------
>                 Key: ZOOKEEPER-622
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-622
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: c client
>            Reporter: Steven Cheng
>             Fix For: 3.3.0
>         Attachments: ZOOKEEPER-622.patch
> Valgrind found:
> {quote}
> ==2357== Conditional jump or move depends on uninitialised value(s)
> ==2357==    at 0x807FDCA: check_events (zookeeper.c:1180)
> ==2357==    by 0x808043A: zookeeper_process (zookeeper.c:1775)
> ==2357==    by 0x806A21B: Zookeeper_close::testCloseConnected1() 
> (TestZookeeperClose.cc:161)
> ==2357==    by 0x806C6BF: CppUnit::TestCaller<Zookeeper_close>::runTest() 
> (TestCaller.h:166)
> {quote}
> zookeeper.c:1180 was the first if in send_set_watches.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

Reply via email to