zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Bangert <...@groovie.org>
Subject Re: Does Zookeeper Lock Entire Znode Tree During a Write
Date Tue, 15 May 2012 16:02:02 GMT
On 5/14/12 9:15 PM, dmly wrote:
> Hi,
> Does ZK lock the entire znode tree during a write? Or does ZK just locks the
> top most znode that a client is connecting to?
> For example:
> When I connect to "/doug" and create the "doug/lock-001" node and do and
> update, is "/" locked or just "/doug"?

ZK actually doesn't have the notion of locks inherently, locking is a
client concept implemented by using ZK atomic operations. So none of the
nodes are actually locked in ZK when you create a node named 'lock-001'.
Any ZK client with appropriate permissions to the node (defined by the
node's ACL) may alter/remove the nodes.

-- 
Ben Bangert
(ben@ || http://) groovie.org


Mime
View raw message