zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shelley, Ryan" <Ryan.Shel...@disney.com>
Subject session watches
Date Mon, 05 Mar 2012 23:59:06 GMT
If I'm correct after reading the docs, if my client sets a watch on a znode, disconnects, then
automatically reconnects, any appropriate pending watches will be fired. I'm assuming this
is only as long as the ZooKeeper client handles the reconnection, though. If, however, an
expiration is received during a reconnection or the client app shuts down, I'll have to reset
all the watches. Is this correct?

Additionally, I'm curious if there is a way to know if there are any watches currently on
a znode. Since we can't do ephemeral parent nodes, yet, and if I have a client that fails
(which results in losing their session and watches) - or forcefully shutdown from Eclipse
(which is what happens when I'm testing), I'll need to find out which znodes are no longer
being watched and reestablish them (possibly by another client).

Another thought was a "named" watch, where a watch can be saved between sessions by having
uniquely named clients (I know this isn't currently supported, just thinking out loud). Just
trying to figure out how to make due without ephemeral parent nodes.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message