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

Sylvain Lebresne commented on CASSANDRA-2103:
---------------------------------------------

Sorry but I'm not sure expiring counters work.

First, there is the problem I've describe in CASSANDRA-2101, that is still 
valid here since expiring counters become tombstone when expired. So we will 
have unpredictible results.

But this unpredictibility is even worst here I believe.  Say you do a first 
increment with a ttl of x seconds and let's call c1 the resulting expiring 
column. And say that later (but *much before* c1 expires from the client 
standpoint) you do another increment without ttl (or with one, that doesn't 
really matter actually) and let's call this c2.

Then the result will all depend on when compaction happens. If c1 and c2 are 
compacted (or resolved if we're talking memtable) quickly (say c1 is still in 
the memtable when c2 arrive for instance), then we'll end up with a value of 
c1.value() + c2.value(), this having no ttl (or c2 ttl if it had one).

But if c1 and c2 are compacted after c1 has expired (which can easily happen, 
even if c2 was issued much before c1 expires), we'll end up with only c2 (since 
during reconciliation c1 will now be a tombstone with lower timestamp than c2).

In my opinion this is far too much unpredictable and dependent on internal 
events. So for now, and unless I'm missing something obvious, I'm -1 on this.


> expiring counter columns
> ------------------------
>
>                 Key: CASSANDRA-2103
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2103
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 0.8
>            Reporter: Kelvin Kakugawa
>            Assignee: Kelvin Kakugawa
>             Fix For: 0.8
>
>         Attachments: 0001-CASSANDRA-2103-expiring-counters-logic-tests.patch
>
>
> add ttl functionality to counter columns.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to