You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sylvain Lebresne (JIRA)" <ji...@apache.org> on 2010/05/19 18:59:55 UTC
[jira] Commented: (CASSANDRA-1109) Cassandra does not expire data
after setting timeToLive argument for each value
[ https://issues.apache.org/jira/browse/CASSANDRA-1109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12869205#action_12869205 ]
Sylvain Lebresne commented on CASSANDRA-1109:
---------------------------------------------
Indeed, good catch. Thanks
+1 on the patch
> Cassandra does not expire data after setting timeToLive argument for each value
> -------------------------------------------------------------------------------
>
> Key: CASSANDRA-1109
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1109
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.7
> Reporter: Jignesh Dhruv
> Assignee: Sylvain Lebresne
> Fix For: 0.7
>
> Attachments: CASSANDRA-1109.patch
>
>
> Hello,
> I downloaded latest cassandra source code from svn trunk. I wanted to test expire data functionality. Using Thrift API, I set timeToLive parameter for each fieldValue, however cassandra ignored it and did not expire any data.
> I debugged cassandra's source code and found a bug in src/java/org/apache/cassandra/db/RowMutation.java.
> In RowMutation.addColumnOrSuperColumnToRowMutation() method, QueryPath was not setting timeToLive argument. I updated RowMutation.java locally and tested it and then my data expired after 'n' number of seconds.
> I wanted to have this fix in the trunk also.
> Index: src/java/org/apache/cassandra/db/RowMutation.java
> ===================================================================
> --- src/java/org/apache/cassandra/db/RowMutation.java (revision 946222)
> +++ src/java/org/apache/cassandra/db/RowMutation.java (working copy)
> @@ -295,12 +295,12 @@
> {
> for (org.apache.cassandra.thrift.Column column : cosc.super_column.columns)
> {
> - rm.add(new QueryPath(cfName, cosc.super_column.name, column.name), column.value, column.timestamp);
> + rm.add(new QueryPath(cfName, cosc.super_column.name, column.name), column.value, column.timestamp, column.ttl);
> }
> }
> else
> {
> - rm.add(new QueryPath(cfName, null, cosc.column.name), cosc.column.value, cosc.column.timestamp);
> + rm.add(new QueryPath(cfName, null, cosc.column.name), cosc.column.value, cosc.column.timestamp, cosc.column.ttl);
> }
> }
> Thanks,
> Jignesh
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.