zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Dunning <ted.dunn...@gmail.com>
Subject Re: Atomic Compare-and-swap like operations
Date Sat, 15 Jan 2011 21:43:23 GMT
I think that the multi stuff is the ideal place for this kind of capability.
 To do this, we would need to add a get operation to the current collection.
 I think that would be an excellent addition, not only for your use case but
also the one where you want to get consistent copies of several znodes at
once.

On Sat, Jan 15, 2011 at 8:14 AM, Scott Fines <scottfines@gmail.com> wrote:

> It seems like it would be a very powerful option to be able to have a
> "delete-and-return" operation that atomically deletes a znode, and returns
> the bytes that were previously stored in that znode. Is there a particular
> reason why this was not chosen as the behavior of the API? In most of the
> other generic compare-and-swap operations (put-if-absent and
> set-if-matches), there is already a mechanism in place, or one can
> relatively easily be implemented, but this seems like an odd oversight.
>
> I saw that ZooKeeper-965<
> https://issues.apache.org/jira/browse/ZOOKEEPER-965>
> could
> potentially address this in the future, but it seems like API overkill for
> something like this.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message