Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default_time_to_live set to 604800 instead to 0 #18651

Closed
kocic11 opened this issue May 13, 2024 · 6 comments
Closed

default_time_to_live set to 604800 instead to 0 #18651

kocic11 opened this issue May 13, 2024 · 6 comments

Comments

@kocic11
Copy link

kocic11 commented May 13, 2024

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';
@tzach
Copy link
Contributor

tzach commented May 15, 2024

@raphaelsc ?

@raphaelsc
Copy link
Member

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';

@raphaelsc
Copy link
Member

raphaelsc commented May 20, 2024

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

@kocic11
Copy link
Author

kocic11 commented May 20, 2024

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

@raphaelsc
Copy link
Member

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

@kocic11
Copy link
Author

kocic11 commented May 20, 2024

I am closing the issue for now. Thanks.

@kocic11 kocic11 closed this as completed May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants