2

I am having this issue of disk space in Cassandra 2.1.12. Even after the TTL, sstables are persisted on disk. I have given below the definition of my column family and it's a time series data with date as a partitioning key.

Definition :

AND bloom_filter_fp_chance = 0.01
    AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
    AND comment = ''
    AND compaction = {'max_sstable_age_days': '92', 'base_time_seconds': '3600', 'class': 'org.apache.cassandra.db.compaction.DateTieredCompactionStrategy'}
    AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
    AND dclocal_read_repair_chance = 0.1
    AND default_time_to_live = 8640000
    AND gc_grace_seconds = 3600
    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';
Naresh
  • 5,073
  • 12
  • 67
  • 124
  • 1
    You have a GC grace period of 100 days, but 92 days will make an SSTable eligible for deletion.That means your SSTables could still contain Tombstones when they are being considered for a compaction. Have you tried to reverse these values? – xmas79 Nov 14 '16 at 11:32
  • 1
    Cassandra won't delete tombstones (TTLed entries get "tombstoned") until after `gc_grace_seconds` has have been reached for the tombstone. If you want a compaction to clean out deleted data immediately you need to set the value to 0. If you run more than one node with data redundancy that is not what you want though. You are running the risk of entries being resurrected. – Ralf Nov 14 '16 at 15:20
  • @Ralf I apologise for the incorrect values and corrected in the question. Actually `default_time_to_live = 8640000` and `gc_grace_seconds = 3600`. As i read after `default_time_to_live` columns will be marked tombstones and after `gc_grace_seconds` configuration on a table has elapsed for a given tombstone it should get deleted. But it is not happening. Could you please tell me what could be the problem now. – Naresh Nov 15 '16 at 06:15

0 Answers0