incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Rogers <ian.rog...@contactclean.com>
Subject Re: atomic test-or-set
Date Tue, 05 Oct 2010 15:55:02 GMT
  On 05/10/2010 16:30, Ryan King wrote:
> On Tue, Oct 5, 2010 at 8:23 AM, Ian Rogers<ian.rogers@contactclean.com>  wrote:
>> Does Cassandra have an atomic test-or-set operation?
>>
>> That is, I want to check to see if a key has a value and, if not, set it to
>> something.  But it must be an atomic operation - I can't do a separate fetch
>> and then set from the application as that creates a possible race condition
>> with another application.
>>
>> Equivalent to the SQL "update foo set grum = 'bang' where isnull(grum) ..."
> You can (sorta) do this per-row, but you can't scan a whole CF and do this.
>
>> Any thoughts how to do this?
> I think you can probably do what you want with cassandra, but your
> example is too vague to be sure.
>
> -ryan

Answering my own question: it's not really tractable in general in 
cassandra - https://issues.apache.org/jira/browse/CASSANDRA-48

Ian

Mime
View raw message