incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clint Kelly <clint.ke...@gmail.com>
Subject Re: Resetting a counter in CQL
Date Sat, 01 Mar 2014 00:44:02 GMT
Great, thanks!


On Fri, Feb 28, 2014 at 4:38 PM, Tyler Hobbs <tyler@datastax.com> wrote:

>
> On Fri, Feb 28, 2014 at 6:32 PM, Clint Kelly <clint.kelly@gmail.com>wrote:
>
>>
>>
>> What is the best known method for resetting a counter in CQL?  Is it best
>> to read the counter and then increment it by a negative amount?
>
>
> Do this.
>
>
>>   Or to delete the row and then increment it by zero?
>>
>
> Don't do this.  When you delete a counter, you are basically saying "I
> will never use this counter again".  If you try to use it again, the
> behavior is undefined. It's one of the documented limitations of counters.
>
>
> --
> Tyler Hobbs
> DataStax <http://datastax.com/>
>

Mime
View raw message