cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jabbar Azam <>
Subject idempotent counters
Date Thu, 08 May 2014 13:07:00 GMT

Do people use counters when they want to have idempotent operations in

I have a use case for using a counter to check for a count of objects in a
partition. If the counter is more than some value then the data in the
partition is moved into two different partitions. I can't work out how to
do this splitting and recover if a problem happens during modification of
the counter.
that counters shouldn't be used if you want idempotency. I would
agree, but the alternative  is not very elegant. I would have to manully
count the objects in a partition and then move the data and repeat the
operation if something went wrong.

It is less resource intensive to read a counter value to see if a partition
needs splitting then to read all the objects in a partition. The counter
value can be stored in its own table sorting in descending order of the
counter value.

Does anybody else use another technique for achieving this idempotency with

I'm using cassandra 2.0.7.


Jabbar Azam

View raw message