incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Lebresne <sylv...@datastax.com>
Subject Re: deleted counters keeps their value?
Date Wed, 21 Sep 2011 16:12:29 GMT
On Wed, Sep 21, 2011 at 5:49 PM, Radim Kolar <hsn@sendmail.cz> wrote:
> Dne 21.9.2011 14:44, David Boxenhorn napsal(a):
>>
>> The reason why counters work is that addition is commutative, but deletes
>> are not commutative
>
> This is not my case. if you look at my 2 posts.
>    1st post seems to be CLI bug because same operation from program works
> fine.
>     In 2nd post i already see that counter is deleted and it can not be
> caused by message ordering because it is single node cluster
>
> in 1.0 Beta 1. case reported in my 1st post is fixed, but 2nd problem still
> exists;
>
> on single node cluster: -> increment -> delete -> increment with 1 sec
> delays should work. How it can be fine to return stale value by counter
> design?

Incrementing after a deletion don't work. It's a current limitation and will
probably won't be "fixed" soon (and yes, the underlying reason is that
deletion and incrementation are not commutative, which is a problem
because there is no guarantee in Cassandra for a given node of the order
it will receive messages -- independently of the order of the operation the
client does).

If you need to reset a counter, you need to insert -value.

--
Sylvain

Mime
View raw message