Patrick Hunt updated ZOOKEEPER-267:

    Attachment: ZOOKEEPER-267.patch

This patch ensures that we don't send duplicate state change notifications to 
the watcher. Watcher is assumed to initially be in "disconnected" state. 
Updated docs to this effect.

I reviewed the c code and it looks ok, I don't see dups being sent to c 
watcher. Please ensure this is true and I didn't miss something.

Also note that I fixed a problem with the C cli code. In some cases the watcher 
might be called before zookeeper_init returns - as a result the old code was 
segfaulting due to zh being used in the watcher. Should have been using the 
"zzh" param instead.

Verified all tests still pass - c and java, also added a new client test to 
verify that dup state change events are no longer sent to client.

> java client incorrectly generating syncdisconnected event when in 
> disconnected state
> ------------------------------------------------------------------------------------
>                 Key: ZOOKEEPER-267
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-267
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: c client, java client
>    Affects Versions: 3.0.0, 3.0.1
>            Reporter: Patrick Hunt
>             Fix For: 3.1.0
>         Attachments: ZOOKEEPER-267.patch
> The java client (and someone should also review the c client) is generating a 
> syncdisconnected even if the client is currently in the disconnected state. 
> We saw this with a user running the java client against a down standalone 
> server (server not running, connection refused) - the "syncdisconnected" is 
> generated by the client lib each time a connection attempt (fails) is made. 
> Should only be generated once.

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