java - In ZooKeeper, is there a way to write a hierarchy atomically without implementing distributed locks yourself? -
let's want write out tree zookeeper
. . / \ . b c . / \ . d e
some other client come along , delete node b right after create before i'm able write node 'd' or 'e'.
is there way can write hierarchy atomically, or possibly lock path?
you can use new multi() api
it completes operations or aborts them all.
Comments
Post a Comment