zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Reed <br...@yahoo-inc.com>
Subject RE: Sending data during NodeDataChanged or NodeCreated
Date Wed, 07 Jan 2009 17:25:47 GMT
This is the behavior we had when we first implemented the API, and in every case where people
used the information there was a bug. it is virtually impossible to use correctly. In general
I'm all for giving people rope, but if it always results in death, you should stop handing
it out.

In your example, if the ACL changed and then the data changed, we would have a security hole
if we sent the data with the watch.

From: burtonator@gmail.com [burtonator@gmail.com] On Behalf Of Kevin Burton [burton@spinn3r.com]
Sent: Tuesday, January 06, 2009 4:39 PM
To: zookeeper-user@hadoop.apache.org
Subject: Sending data during NodeDataChanged or NodeCreated

So if I understand this correctly, if I receive a NodeDataChanged event, and
then attempt do do a read of that node, there's a race condition where the
server could crash and I would be disconnected and my read would hit an
Or, the ACL could change and I no longer have permission to read the file
(though I did for a short window).

..... now I have to add all this logic to retry.  Are there any other race
conditions I wonder.

Why not just send the byte[] data during the NodeDataChanged or NodeCreated
event from the server?  This would avoid all these issues.

It's almost certainly what the user wants anyway.


Founder/CEO Spinn3r.com
Location: San Francisco, CA
AIM/YIM: sfburtonator
Skype: burtonator
Work: http://spinn3r.com

View raw message