cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kelvin Kakugawa (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CASSANDRA-1546) (Yet another) approach to counting
Date Wed, 06 Oct 2010 16:39:35 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-1546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12918581#action_12918581
] 

Kelvin Kakugawa commented on CASSANDRA-1546:
--------------------------------------------

I have no issues w/ a counter-specific API.

UUIDs are interesting enough that they're worth investigating.

The complexity of the context-based logic is to be space efficient.  In practice, cassandra
nodes are typically I/O bound, not CPU bound.  Beyond that, a reasonable amount of effort
was invested to optimize the implementation--a modified quicksort and dynamic programming
for set comparison.  ntm, it leverages byte arrays, instead of creating more objects for GC.
 So, I'm not confident in the statement that #1546 is clearly faster than #1072.  As a rule
of thumb, it's better to directly manage your memory usage, as opposed to relying on the runtime's
GC.

Supporting decrements, natively, is not complex.  The original implementation of #1072 against
0.6 re-used #580's vector clock tuples.  So, it could track the latest count (for a partition)
by the timestamp of the tuple.  The tuple format was modified to remove the timestamp, because
I wanted to cut down on the size of the partitioned counter.  However, in retrospect, it definitely
is useful for decrements.  I wrote and deployed a modified version of #1072 that widens the
tuple, again, w/ a logical clock--# of operations computed, to support decrements.

I'll look into refactoring the context-based logic for partitioned counters.  I have no problems
supporting your UUID implementation as an optional code path.

> (Yet another) approach to counting
> ----------------------------------
>
>                 Key: CASSANDRA-1546
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1546
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>             Fix For: 0.7.0
>
>         Attachments: 0001-Remove-IClock-from-internals.patch, 0001-v2-Remove-IClock-from-internals.patch,
0001-v3-Remove-IClock-from-internals.patch, 0002-Counters.patch, 0002-v2-Counters.patch, 0002-v3-Counters.patch,
0003-Generated-thrift-files-changes.patch, 0003-v2-Thrift-changes.patch, 0003-v3-Thrift-changes.patch,
marker_idea.txt
>
>
> This could be described as a mix between CASSANDRA-1072 without clocks and CASSANDRA-1421.
> More details in the comment below.

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


Mime
View raw message