You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Sylvain Lebresne <sy...@datastax.com> on 2013/07/01 10:41:13 UTC

Re: How to do a CAS UPDATE on single column CF?

You're right, there is currently no way to do this since 1) insert can't
have a IF currently and 2) update can't update such table.

We'll fix that: https://issues.apache.org/jira/browse/CASSANDRA-5715

--
Sylvain


On Sat, Jun 29, 2013 at 9:51 PM, Blair Zajac <bl...@orcaware.com> wrote:

> On 6/24/13 8:23 PM, Blair Zajac wrote:
>
>> How does one do an atomic update in a column family with a single column?
>>
>> I have a this CF
>>
>> CREATE TABLE schema_migrations (
>> version TEXT PRIMARY KEY,
>> ) WITH COMPACTION = {'class': 'LeveledCompactionStrategy'};
>>
>
> Anyone?  Should I raise this on the developer mailing list or open a
> ticket?
>
> Blair
>

Re: How to do a CAS UPDATE on single column CF?

Posted by Andrew Cobley <a....@dundee.ac.uk>.
According to Jonathan Ellis talk at Cassandra 13 it does use Paxos:

http://www.youtube.com/watch?v=PcUpPR4nSr4&list=PLqcm6qE9lgKJzVvwHprow9h7KMpb5hcUU

http://www.slideshare.net/jbellis/cassandra-summit-2013-keynote

Andy

On 1 Jul 2013, at 19:40, Francisco Andrades Grassi <bi...@gmail.com>> wrote:

http://en.wikipedia.org/wiki/Compare-and-swap

I believe C* uses Paxos for CAS but not completely sure?

--
Francisco Andrades Grassi
www.bigjocker.com<http://www.bigjocker.com/>
@bigjocker

On Jul 1, 2013, at 1:49 PM, "Hiller, Dean" <De...@nrel.gov>> wrote:

What does CAS stand for? And is that the row locking feature like hbase's
setAndReadWinner that you give the previous val and next val and your next
val is returned if you won otherwise the current result is returned and
you know some other node won?



The University of Dundee is a registered Scottish Charity, No: SC015096

Re: How to do a CAS UPDATE on single column CF?

Posted by Francisco Andrades Grassi <bi...@gmail.com>.
http://en.wikipedia.org/wiki/Compare-and-swap

I believe C* uses Paxos for CAS but not completely sure?

--
Francisco Andrades Grassi
www.bigjocker.com
@bigjocker

On Jul 1, 2013, at 1:49 PM, "Hiller, Dean" <De...@nrel.gov> wrote:

> What does CAS stand for? And is that the row locking feature like hbase's
> setAndReadWinner that you give the previous val and next val and your next
> val is returned if you won otherwise the current result is returned and
> you know some other node won?
> 
> Thanks,
> Dean
> 
> On 7/1/13 12:09 PM, "Blair Zajac" <bl...@orcaware.com> wrote:
> 
>> Thanks!
>> 
>> On 7/1/13 1:41 AM, Sylvain Lebresne wrote:
>>> You're right, there is currently no way to do this since 1) insert
>>> can't have a
>>> IF currently and 2) update can't update such table.
>>> 
>>> We'll fix that: https://issues.apache.org/jira/browse/CASSANDRA-5715
>>> 
>>> --
>>> Sylvain
>>> 
>>> 
>>> On Sat, Jun 29, 2013 at 9:51 PM, Blair Zajac <blair@orcaware.com
>>> <ma...@orcaware.com>> wrote:
>>> 
>>>    On 6/24/13 8:23 PM, Blair Zajac wrote:
>>> 
>>>        How does one do an atomic update in a column family with a
>>> single column?
>>> 
>>>        I have a this CF
>>> 
>>>        CREATE TABLE schema_migrations (
>>>        version TEXT PRIMARY KEY,
>>>        ) WITH COMPACTION = {'class': 'LeveledCompactionStrategy'};
>>> 
>>> 
>>>    Anyone?  Should I raise this on the developer mailing list or open
>>> a ticket?
>>> 
>>>    Blair
> 


Re: How to do a CAS UPDATE on single column CF?

Posted by "Hiller, Dean" <De...@nrel.gov>.
What does CAS stand for? And is that the row locking feature like hbase's
setAndReadWinner that you give the previous val and next val and your next
val is returned if you won otherwise the current result is returned and
you know some other node won?

Thanks,
Dean

On 7/1/13 12:09 PM, "Blair Zajac" <bl...@orcaware.com> wrote:

>Thanks!
>
>On 7/1/13 1:41 AM, Sylvain Lebresne wrote:
>> You're right, there is currently no way to do this since 1) insert
>>can't have a
>> IF currently and 2) update can't update such table.
>>
>> We'll fix that: https://issues.apache.org/jira/browse/CASSANDRA-5715
>>
>> --
>> Sylvain
>>
>>
>> On Sat, Jun 29, 2013 at 9:51 PM, Blair Zajac <blair@orcaware.com
>> <ma...@orcaware.com>> wrote:
>>
>>     On 6/24/13 8:23 PM, Blair Zajac wrote:
>>
>>         How does one do an atomic update in a column family with a
>>single column?
>>
>>         I have a this CF
>>
>>         CREATE TABLE schema_migrations (
>>         version TEXT PRIMARY KEY,
>>         ) WITH COMPACTION = {'class': 'LeveledCompactionStrategy'};
>>
>>
>>     Anyone?  Should I raise this on the developer mailing list or open
>>a ticket?
>>
>>     Blair


Re: How to do a CAS UPDATE on single column CF?

Posted by Blair Zajac <bl...@orcaware.com>.
Thanks!

On 7/1/13 1:41 AM, Sylvain Lebresne wrote:
> You're right, there is currently no way to do this since 1) insert can't have a
> IF currently and 2) update can't update such table.
>
> We'll fix that: https://issues.apache.org/jira/browse/CASSANDRA-5715
>
> --
> Sylvain
>
>
> On Sat, Jun 29, 2013 at 9:51 PM, Blair Zajac <blair@orcaware.com
> <ma...@orcaware.com>> wrote:
>
>     On 6/24/13 8:23 PM, Blair Zajac wrote:
>
>         How does one do an atomic update in a column family with a single column?
>
>         I have a this CF
>
>         CREATE TABLE schema_migrations (
>         version TEXT PRIMARY KEY,
>         ) WITH COMPACTION = {'class': 'LeveledCompactionStrategy'};
>
>
>     Anyone?  Should I raise this on the developer mailing list or open a ticket?
>
>     Blair