curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Jaton <bja...@radiantlogic.com>
Subject Re: Transaction question
Date Wed, 24 Sep 2014 21:28:54 GMT
It's more a "compare-and-set type operation" but on the same node.
I think I have to do a lock indeed.

Thanks!

On Wed, Sep 24, 2014 at 8:35 AM, Jordan Zimmerman <
jordan@jordanzimmerman.com> wrote:

> There are no ZooKeeper APIs that will allow you to atomically check the
> value of a node and change another node based on that value. You’d need to
> write a recipe for that. i.e. get a lock (InterProcessMutex), get the
> value, change another value, release the lock.
>
> -JZ
>
>
> On September 23, 2014 at 6:48:19 PM, Benjamin Jaton (
> bjaton@radiantlogic.com) wrote:
>
> Hello,
>
> I would like to know if there is a way to get the value of a node, update
> it and save it, all in the same transaction. I have been looking for a way
> to do that but no luck.
> Any idea?
>
> Thanks
> Ben
>
>

Mime
View raw message