curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arie Zilberstein <>
Subject Atomically setting a node's data while having leadership
Date Wed, 11 Sep 2013 08:40:10 GMT

I wonder if it is possible to achieve the following behavior: Assume a
leader election scenario where a certain process has been elected as leader
and its takeLeadership() method was called. Inside that method the process
wishes to perform a Zookeeper operation, e.g., to set data in a node. But,
the leader may receive a message saying to relinquish leadership
immediately at any point in time. So the question is, is it possible to set
this data while making sure that we're still the leader?
Can Curator support this sort of an atomic "test-and-set" operation?


View raw message