zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jamie Johnson <jej2...@gmail.com>
Subject Re: setData question
Date Wed, 30 Nov 2011 15:20:40 GMT
Yeah talking about through a create, sorry not setData.  If the node
already exists and you call setData is it a delete and then a set?  I
ask because I'm trying to track down an issue where the data on the
node is null.  It's hard to reproduce but it appears that if the node
exists and I call setData I sometimes see a node with no information.
My guess is that if client 1 calls setData on a node that exists it
first deletes, then if client 2 comes in and tries to read the data he
sees nothing, then the set actually happens for client 1.  I'm just
guessing though so trying to figure out if that is how it should work
or not.

On Wed, Nov 30, 2011 at 10:10 AM, André Oriani
<ra078686@students.ic.unicamp.br> wrote:
> Not sure if I understood your question. All operations on  Zookeeper at
> done atomically. So if you meant ZooKeeper.create(path, data,. ...)  the
> creation of the node and the set of data are done in single shot.  Now if
> do ZooKeeper.create and then ZooKeeper.setData, other operation from other
> client can happen between the create and the setData.
> I heard something of transactions on Zookeeper, but as I have not been
> following the maillist  I do not know if the support exists or will exist.
>
>
> Regards,
> Andr[e
>
>
> n Wed, Nov 30, 2011 at 12:25, Jamie Johnson <jej2003@gmail.com> wrote:
>
>> When a call is made to setData is the operation done atomically?  I.e.
>> is it guaranteed that the node and its data are done in one shot such
>> that any clients trying to read this data do not need to be aware of
>> the fact that the node could be empty or is it possible that the node
>> will exist with no data for a short period of time?
>>
>

Mime
View raw message