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

Jaakko Laine commented on CASSANDRA-699:
----------------------------------------

personally I'm not a big fan of adding another class for this purpose. If we 
add new types for all new features in this compartment, we'll very soon end up 
having our code littered with "if (foo instanceof This) do this, else if (foo 
instanceof That) do that, else if ..."

Current vector clock work (#580, full patch not yet in jira) includes two more 
column classes, which would mean the total amount of column types would be 
five. That will be a mess. With Kelvin we've recently talked about the 
possibility of refactoring timestamp "out of the view". That is, instead of 
exposing Column internals (timestamp), the API should have relevant methods the 
clients need (timestamp is mostly about priority, conflict resolution etc 
anyway), and then internally do-the-right-thing based on if the column is 
standard, expiring, vector, super or whatever.

Obviously this is a big refactoring as timestamp is so far spread and used, but 
having new type for every new need is going to get us into trouble sooner or 
later. Don't know if this would work, though, have not yet actually tried the 
refactoring.


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

Reply via email to