You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Russ Hatch (JIRA)" <ji...@apache.org> on 2014/02/28 20:20:27 UTC

[jira] [Comment Edited] (CASSANDRA-6782) setting TTL on some columns seems to expire whole row

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

Russ Hatch edited comment on CASSANDRA-6782 at 2/28/14 7:20 PM:
----------------------------------------------------------------

I'm not certain how folks may be using this behavior, but I'm inclined to think it's pretty surprising. I have seen one instance where someone mentioned that they are setting a TTL for an entire row and then issue updates after the fact to give shorter TTL's to specific data (CASSANDRA-6654). They would be unwittingly expiring the data they use to isolate a single row at the same time when they intend to keep that data.


was (Author: rhatch):
I'm not certain how folks may be using this behavior, but I'm inclined to think it's pretty surprising. I have seen one instance where someone mentioned that they are setting a TTL for an entire row and then issue updates after the fact to give shorter TTL's to select data (CASSANDRA-6654). They would be unwittingly expiring the data they use to isolate a single row at the same time when they intend to keep that data.

> setting TTL on some columns seems to expire whole row
> -----------------------------------------------------
>
>                 Key: CASSANDRA-6782
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6782
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: java version "1.7.0_51"
> cassandra from trunk: 9c4824d6c476
>            Reporter: Russ Hatch
>
> I create a table with 4 columns, set a ttl on 2 of the columns and when the TTL is up, the entire row disappears.
> {noformat}
> cqlsh:myks> CREATE TABLE paging_test (
>         ...   id int,
>         ...   mytext text,
>         ...   anothervalue text,
>         ...   somevalue text,
>         ...   PRIMARY KEY (id, mytext)
>         ... );
> cqlsh:myks> insert into paging_test (id, mytext, anothervalue, somevalue) values (1, 'foo', 'some', 'another');
> cqlsh:myks> select * from paging_test;
>  id | mytext | anothervalue | somevalue
> ----+--------+--------------+-----------
>   1 |    foo |         some |   another
> (1 rows)
> cqlsh:myks> update paging_test using ttl 10
>         ...   set somevalue='one', anothervalue='two'
>         ...   where id = 1 and mytext = 'foo';
> cqlsh:myks> select * from paging_test;
>  id | mytext | anothervalue | somevalue
> ----+--------+--------------+-----------
>   1 |    foo |          two |       one
> (1 rows)
> cqlsh:myks> -- wait for it....
> cqlsh:myks> select * from paging_test;
> (0 rows)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)