cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Mischo <>
Subject Re: Incr/Decr Counters in Cassandra
Date Wed, 04 Nov 2009 22:19:47 GMT
Sure, that's why you say in the docs, "This isn't a sequence, it's a  
counter."  Just because in RDBMS land sequences are safe to use that  
way doesn't meaning in NRDBMS land counters have to work the same  
way.  Eventually consistent models don't work very well for sequences,  
but counters should be just fine, unless you're using them for keys or  
usage counters (which are dangerous unless you're using ALL, which is  

On Nov 4, 2009, at 4:12 PM, Bill de hOra wrote:

> Christian Vest Hansen wrote:
>> Numeric addition and subtraction are commutable operations: they can
>> be performed in any order without conflict, which I think is a key
>> performance promise.
> Correct, but a common use case for incr/decr counting is issuing  
> numeric keys, which requires a global lock or total ordering  
> (something I think ZK can do). So this approach doesn't work for  
> that, and people might get nasty surprises.
> Bill

View raw message