Hi Holger,
We chatted on IRC, but I'm following up here with the same discussion
for the wider audience on the mailing list.
You can get much the same behavior as an atomic_add that returns the
value as a pair of get/cond_put operations. Imagine that we had a space
like this:
space kv key k attribute int count
we could do an atomic increment from Python like this:
>>> c = hyperdex.client.Client('localhost', 1982)
>>> v = c.get('kv', 'some key')
>>> c.cond_put('kv', 'some key', {'v': v['count']}, {'v': v['count'] + 1})
True
>>> old_value = v['count']
>>> new_value = v['count'] + 1
Best,
Robert
> --
> You received this message because you are subscribed to the Google Groups
> "hyperdex-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to
hyperdex-discu...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.