incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Blair Zajac <bl...@orcaware.com>
Subject Mixing CAS UPDATE and non-CAS DELETE
Date Tue, 25 Jun 2013 03:30:57 GMT
Looking at the CAS unit tests [1], if one does a CAS UPDATE to create a ROW:

   UPDATE test SET v1 = 2, v2 = 'foo' WHERE k = 0 IF NOT EXISTS

there isn't a CAS DELETE FROM that only uses the partition key.  You can 
do this to delete the row using CAS:

   DELETE FROM test WHERE k = 0 IF v1 = null

But if I want to delete it regardless of v1, then this doesn't work:

   DELETE FROM test WHERE k = 0 IF EXISTS

So one is left to

   DELETE FROM test WHERE k = 0

How does this non-CAS DELETE mix with a CAS UPDATE for the same 
partition key?  Will they properly not step over each other?

Thanks,
Blair

[1] 
https://github.com/riptano/cassandra-dtest/blob/master/cql_tests.py#L3044

Mime
View raw message