cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <>
Subject [jira] Commented: (CASSANDRA-1072) Increment counters
Date Tue, 20 Jul 2010 13:14:55 GMT


Sylvain Lebresne commented on CASSANDRA-1072:

I may be wrong here, but I think that it is a bit harder in
Cassandra. At least, here's a scenario I'm unsure how to deal with unless you
distinguish a primary replica for each write (as done in Kelvin algorithm).

Take a cluster with RP=3. Let's call A, B and C the 3 node hosting some
counter c. Now say you do writes with CL.QUORUM (or less) and the writes are
initially done on some other node D that dispatch the writes to A, B and C.
Consider the two following scenario:

S1: you do 2 simple increments (+1) and everything works fine.
A, B and C receives those and each have 2 columns whose values are 1 and whose
clocks are ... (that's the point, not sure what are those clock to make it

S2: you do 3 simple increments (+1). For some reason you are (really) unlucky
and on each write one of the node (each time a different one) don't get it.
So you also end up with each node (A, B and C) having 2 columns whose values
are 1 and whose clocks are ... (same as in S1). But note that it's CL.QUORUM,
we have acknowledged the writes and should return 3 on a CL.QUORUM or CL.ALL

I don't see any reasonable values for the clocks so that upon a read (even at
CL.ALL) both those scenario returns the right value.

Sorry if I miss something simple, but I'll be interested by any idea/solution.

> Increment counters
> ------------------
>                 Key: CASSANDRA-1072
>                 URL:
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Core
>            Reporter: Johan Oskarsson
>            Assignee: Kelvin Kakugawa
>         Attachments: CASSANDRA-1072-2.patch, CASSANDRA-1072.patch
> Break out the increment counters out of CASSANDRA-580. Classes are shared between the
two features but without the plain version vector code the changeset becomes smaller and more

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message