zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amirhossein Kiani <amirhki...@gmail.com>
Subject Getting data after the watch
Date Fri, 02 Mar 2012 00:11:01 GMT
Hi ZooKeepers,

I just recently had an issue about getting the a node's updated data after the watch was actually
fired. Being pretty confused, I read the documentation page again and sure enough this has
been stated:

"A client will see a watch event for a znode it is watching before seeing the new data that
corresponds to that znode."

Now, I'm confused about how a data watch could actually be useful... But aside from that,
is this statement also true about the node's list of Children? I.e. are a node's children
it's "data" too?

Because if this is the case, wouldn't the recipe for barriers hang if it gets the watch for
a new node addition goes off and in:

 if (list.size() < size) {

 list.size() is still smaller than size?

Or is this statement about watches only true for a data on the node?

Many thanks,

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