0

I am planning to enable this tag to solve an issue related to some SSTables that are fully expired and are blocking some other expired SSTables from being expired. I have looked for information on which procedure we should follow, but I cannot seem to find information. For instance: should I apply these changes in all nodes in a cluster and then restart the whole cluster, or can this be done on a one node at a time fashion? I am wondering if there can be some inconsistency issues if one node at a time is changed and restarted, as the configuration would be different between different nodes in the cluster.

For the record, we are working with a 4 node cluster, working with Time Window Compaction Strategy and which has a replication factor 3 and Consistency Level Local Quoruml.

1 Answers1

0

You'll want to set it as a JVM option on all nodes in the cluster, for example:

-Dcassandra.unsafe_aggressive_sstable_expiration=true

After which you'll need to complete a rolling restart to implement.

After this has been implemented, then you can Alter the table to enable it for the table, for example:

ALTER TABLE keyspace.table
WITH compaction = {
  'class': 'org.apache.cassandra.db.compaction.TimeWindowCompactionStrategy',
  'unsafe_aggressive_sstable_expiration': 'true',
  'compaction_window_unit': 'DAYS',
  'compaction_window_size': '1'
};

Obviously use the compaction settings specific to your TWCS table, but hopefully that helps.

Paul
  • 416
  • 2
  • 6