-Re: Does Zookeeper Lock Entire Znode Tree During a Write
Ben Bangert 2012-05-15, 16:02
On 5/14/12 9:15 PM, dmly wrote:
> 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@ || http://) groovie.org