incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Lebresne <sylv...@datastax.com>
Subject Re: default_time_to_live
Date Tue, 01 Oct 2013 17:10:07 GMT
You're not supposed to change the table settings by modifying
system.schema_columnfamilies as this will skip proper propagation of the
change. Instead, you're supposed to do an ALTER TABLE, so something like:
  ALTER TABLE hol WITH default_time_to_live=10;

That being said, if you restart the node on which you've made the update,
the change "should" be picked up and propagated to all nodes. Still not a
bad idea to do the ALTER TABLE to make sure everything is set right.

--
Sylvain


On Tue, Oct 1, 2013 at 10:50 AM, Pieter Callewaert <
pieter.callewaert@be-mobile.be> wrote:

>  Hi,****
>
> ** **
>
> We are starting up a new cluster with Cassandra 2.0.0 and one of the
> features we were interested in was Per-CF TTL (
> https://issues.apache.org/jira/browse/CASSANDRA-3974)****
>
> I didn’t find any commands in CQL to set this value, so I’ve used the
> following:****
>
> ** **
>
>                UPDATE system.schema_columnfamilies SET
> default_time_to_live = 10 WHERE keyspace_name = 'testschema' AND
> columnfamily_name = 'hol';****
>
> ** **
>
> Confirming it is set:****
>
> ** **
>
> cqlsh:testschema> select default_time_to_live from
> system.schema_columnfamilies where keyspace_name = 'testschema' and
> columnfamily_name = 'hol';****
>
> ** **
>
> default_time_to_live****
>
> ----------------------****
>
>                    10****
>
> ** **
>
> Then I Insert some dummy data, but it never expires…****
>
> Using the ttl command I get this:****
>
> ** **
>
> cqlsh:testschema> select ttl(coverage) from hol;****
>
> ** **
>
> ttl(coverage)****
>
> ---------------****
>
>           Null****
>
> ** **
>
> Am I doing something wrong? Or is this a bug?****
>
> ** **
>
> Kind regards,****
>
> [image: Description: cid:image003.png@01CD9CE5.CE5A2330]****
>
> *   **Pieter Callewaert***
>
> *   Web & IT engineer*
>
> * *
>
>    Web:   www.be-mobile.be ****
>
>    Email: pieter.callewaert@be-mobile.be ****
>
>    Tel:  + 32 9 330 51 80****
>
> ** **
>
> ** **
>

Mime
View raw message