cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CASSANDRA-699) Add (optional) expiration time for column
Date Tue, 19 Jan 2010 09:26:54 GMT

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

Sylvain Lebresne commented on CASSANDRA-699:
--------------------------------------------

Yes I agree that having type test all over the place is a bad thing. I'm not
sure it's really the fault of the addition of a new class though (especially
considering it's actually a subtype). It is more a sign that, as you say, the
code for Column exposes too much internals. 
There is two places where 'instanceof ExpiringColumn' is used: 
 1) In ColumnSerializer. We could consider that it's not really client code of
    Column. We also could add a serialize() method to Column directly if we
    really don't like instanceof. Btw, ColumnSerializer.serialize() assumes
    silently that its IColumn argument is actually a Column. Maybe we could
    add a comment at least ?
 2) In CassandraServer, when we convert a Column to a Thrift Column. It
    could make sense to add a toThriftColumn() method to Column (but it would
    create a dependency from Column to the thrift generated Column class).

My point being that the burden on client code that the ExpiringColumn of this
patch add is light and easily removable.  

That being said, if the timestamp refactoring you propose is done, I'm sure we
could use such design to include the TTL. 

> Add (optional) expiration time for column 
> ------------------------------------------
>
>                 Key: CASSANDRA-699
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-699
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>             Fix For: 0.7
>
>         Attachments: 0001-Add-new-ExpiringColumn-class.patch, 0002-Add-TTL-support-to-cassandra.thrift.patch,
0003-Plug-thrift-TTL-addition-to-ExpiringColumn.patch, 0004-Update-test_server-for-insert-changes-and-add-simple.patch
>
>
> Allow to attach an expiration time to a column. 
> An expired column would act much like a 'markedForDelete' one. 

-- 
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