zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robin Bate Boerop <robin.bateboe...@userevents.com>
Subject RE: question about lock recipe and watchers
Date Mon, 17 Sep 2012 18:35:03 GMT
Phil, thank you for the experience report!

Maybe the website should be updated with this suggestion...
________________________________________
From: Phil Carns [carns@mcs.anl.gov]
Sent: 17 September 2012 15:15
To: user@zookeeper.apache.org
Subject: Re: question about lock recipe and watchers

I tried out Michi's suggestion over the weekend and it seems to be
working great.  I just used a one-byte get() in place of the exists()
call recommended in the recipe.  I'm actually using wget(), to be
precise.  The wget() either returns an error immediately (because the
node has already been deleted) or else returns successfully and queues a
watcher that triggers when the node is deleted later.  There is no need
to set a value in the node.




Mime
View raw message