You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Benjamin Lerer (JIRA)" <ji...@apache.org> on 2016/03/01 18:11:18 UTC

[jira] [Commented] (CASSANDRA-11207) Can not remove TTL on table with default_time_to_live

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

Benjamin Lerer commented on CASSANDRA-11207:
--------------------------------------------

||patch||utest||dtest||
|[trunk|https://github.com/apache/cassandra/compare/trunk...blerer:11207-trunk]|[utest|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-11207-trunk-testall/1/]|[dtest|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-11207-trunk-dtest/2/]|

The patch move the handling of the {{default_time_to_live}} in the {{Arguments}} class for CQL queries and in {{CassandraServer}} for Thrift. The patch also unify the behavior for Thrift and CQL ttl (Thrift use to reject ttl equals to zero).

The DTest PR is [here|https://github.com/riptano/cassandra-dtest/pull/831]. 

> Can not remove TTL on table with default_time_to_live
> -----------------------------------------------------
>
>                 Key: CASSANDRA-11207
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11207
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: CQL
>            Reporter: Matthieu Nantern
>            Assignee: Benjamin Lerer
>             Fix For: 3.x
>
>
> I've created a table with a default TTL:
> {code:sql}
> CREATE TABLE testmna.ndr (
>     device_id text,
>     event_year text,
>     event_time timestamp,
>     active boolean,
>     PRIMARY KEY ((device_id, event_year), event_time)
> ) WITH CLUSTERING ORDER BY (event_time DESC)
>     AND bloom_filter_fp_chance = 0.01
>     AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
>     AND comment = ''
>     AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'}
>     AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
>     AND dclocal_read_repair_chance = 0.1
>     AND default_time_to_live = 600
>     AND gc_grace_seconds = 864000
>     AND max_index_interval = 2048
>     AND memtable_flush_period_in_ms = 0
>     AND min_index_interval = 128
>     AND read_repair_chance = 0.0
>     AND speculative_retry = '99.0PERCENTILE';
> {code}
> When I insert data with a "runtime TTL" (INSERT ... USING TTL 86400) everything works as expected (ttl is set to 86400).
> But I can't insert data without TTL at runtime: INSERT ... USING TTL 0; does not work.
> Tested on C* 2.2.4, CentOS 7



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)