scylladb / scylladb

NoSQL data store using the seastar framework, compatible with Apache Cassandra

Home Page:http://scylladb.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

default_time_to_live set to 604800 instead to 0

kocic11 opened this issue · comments

This is Scylla's bug tracker, to be used for reporting bugs only.
If you have a question about Scylla, and not a bug, please ask it in
our mailing-list at scylladb-dev@googlegroups.com or in our slack channel.

  • [] I have read the disclaimer above, and I am reporting a suspected malfunction in Scylla.

Installation details
Scylla version (or git commit hash): Scylla 5.4.3-0.20240211.cf42ca0c2a65
Cluster size: 3
OS (RHEL/CentOS/Ubuntu/AWS AMI): Ubuntu 22.04.3 LTS

I created a table using the command below and expected default_time_to_live = 0:

CREATE TABLE IF NOT EXISTS prod.telemetry (
    t timestamp,
    m text,
    b text,
    st timestamp,
    u text,
    v double,
    PRIMARY KEY ((b,m), t)
)
    WITH CLUSTERING ORDER BY (t DESC)
    AND COMPACTION = {'class': 'TimeWindowCompactionStrategy',
        'compaction_window_size': '1',
        'compaction_window_unit': 'DAYS'};

Instead, I got default_time_to_live = 604800:

CREATE TABLE prod.telemetry (
    b text,
    m text,
    t timestamp,
    st timestamp,
    u text,
    v double,
    PRIMARY KEY ((b, m), t)
) WITH CLUSTERING ORDER BY (t DESC)
    AND bloom_filter_fp_chance = 0.01
    AND caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'}
    AND comment = ''
    AND compaction = {'base_time_seconds': '3600', 'class': 'TimeWindowCompactionStrategy', 'compaction_window_size': '1', 'compaction_window_unit': 'DAYS', 'max_sstable_age_days': '1'}
    AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
    AND crc_check_chance = 1.0
    AND dclocal_read_repair_chance = 0.0
    AND default_time_to_live = 604800
    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';

I noticed IF NOT EXISTS clause. @kocic11 Any chance the table with that setting existed already?

this is what I get locally:

cqlsh> CREATE TABLE IF NOT EXISTS prod.telemetry (     t timestamp,     m text,     b text,     st timestamp,     u text,     v double,     PRIMARY KEY ((b,m), t) )     WITH CLUSTERING ORDER BY (t DESC)     AND COMPACTION = {'class': 'TimeWindowCompactionStrategy',         'compaction_window_size': '1',         'compaction_window_unit': 'DAYS'};
cqlsh> describe prod

CREATE KEYSPACE prod WITH replication = {'class': 'NetworkTopologyStrategy', 'datacenter1': '1'}  AND durable_writes = true;

CREATE TABLE prod.telemetry (
    b text,
    m text,
    t timestamp,
    st timestamp,
    u text,
    v double,
    PRIMARY KEY ((b, m), t)
) WITH CLUSTERING ORDER BY (t DESC)
    AND bloom_filter_fp_chance = 0.01
    AND caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'}
    AND comment = ''
    AND compaction = {'class': 'TimeWindowCompactionStrategy', 'compaction_window_size': '1', 'compaction_window_unit': 'DAYS'}
    AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
    AND crc_check_chance = 1.0
    AND default_time_to_live = 0
    AND gc_grace_seconds = 864000
    AND max_index_interval = 2048
    AND memtable_flush_period_in_ms = 0
    AND min_index_interval = 128
    AND speculative_retry = '99.0PERCENTILE';

if you want to keep existing table, you can just do alter table prod.telemetry WITH default_time_to_live = 0;

It is possible that the table already existed. I'll try the alter table command and monitor if the issue reappears.

please close the issue once you validate it's not an issue on our end.

I am closing the issue for now. Thanks.