DataStax Academy FAQ

DataStax Academy migrated to a new learning management system (LMS) in July 2020. We are also moving to a new Cassandra Certification process so there are changes to exam bookings, voucher system and issuing of certificates.

Check out the Academy FAQ pages for answers to your questions:


question

Tri avatar image
Tri asked ·

Is the TWCS expired_sstable_check_frequency_seconds subproperty obsolete?

DS210 DSE6 Operations Course: Time Window Compaction: https://academy.datastax.com/units/21017-time-window-compaction-dse-operations-apache-cassandra

At 4:00 minute of the video. The slide mentions: expired_sstable_check_frequency_seconds determines how often to check for fully expired (tombstoned) SSTables.

Can you please give the link to the documentation related to that expired_sstable_check_frequency_seconds parameter? Surprisingly there is verly little mention of that param on the internet. A search on DataStax documentation https://docs.datastax.com/en/dse/6.8/dse-admin/search.html?searchQuery=exprired_sstable_check_frequency_seconds ended up with zero hit.

In case this param had become obsolete in modern Cassandra. Maybe this video should be updated?

Regards

compactiontwcs
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

bettina.swynnerton avatar image
bettina.swynnerton answered ·

Hi,

the parameter expired_sstable_check_frequency_seconds is still a valid setting for TimeWindowCompactionStrategy. The default is 600 seconds.

Here from the Cassandra 3.11.6 sources:

https://github.com/apache/cassandra/blob/cassandra-3.11.6/src/java/org/apache/cassandra/db/compaction/TimeWindowCompactionStrategyOptions.java#L45

It is true that we do not cover the parameter explicitly in the documentation, it is not generally a subproperty that needs to be amended.

It can be changed however, by specifying the key expired_sstable_check_frequency_seconds as a TWCS sub-property.

Here is an example:

cqlsh> CREATE TABLE community.tw2 (
   ...     id int PRIMARY KEY,
   ...     data text
   ... ) WITH compaction = {'class': 'org.apache.cassandra.db.compaction.TimeWindowCompactionStrategy', 'compaction_window_size': '1', 'compaction_window_unit': 'MINUTES', 'expired_sstable_check_frequency_seconds': 6000};

cqlsh> describe table community.tw2 ;

CREATE TABLE community.tw2 (
    id int PRIMARY KEY,
    data text
) WITH bloom_filter_fp_chance = 0.01
    AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
    AND comment = ''
    AND compaction = {'class': 'org.apache.cassandra.db.compaction.TimeWindowCompactionStrategy', 'compaction_window_size': '1', 'compaction_window_unit': 'MINUTES', 'expired_sstable_check_frequency_seconds': '6000', 'max_threshold': '32', 'min_threshold': '4'}
    AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
    AND crc_check_chance = 1.0
    AND dclocal_read_repair_chance = 0.1
    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 read_repair_chance = 0.0
    AND speculative_retry = '99PERCENTILE';

I hope this helps.

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.