How does tombstone-aware compaction help reclaim space, and what is a single-SSTable tombstone compaction?
Last updated
Compaction drops tombstones older than
gc_grace_secondsplus the data they shadow, but only if no other SSTable holds older data for that key (overlap check).Single-SSTable tombstone compaction rewrites one file alone when its droppable tombstone ratio exceeds
tombstone_threshold(default 0.2), at most once pertombstone_compaction_interval(default 1 day).Limitation: if shadowed data lives in other SSTables, those tombstones can't be safely dropped, so normal compaction and repair are still needed.
- https://www.jusdb.com/blog/cassandra-compaction-strategies-stcs-lcs-twcs
- https://cassandra.apache.org/doc/stable/cassandra/managing/operating/compaction/overview.html
- https://medium.com/@lkalapati.dba/tombstones-66a0d5ab2579
- https://murukeshm.github.io/cassandra/3.8/operating/compaction.html
- https://www.scylladb.com/glossary/cassandra-compaction/
- https://cassandra.apache.org/doc/4.1/cassandra/operating/compaction/index.html
- https://docs.datastax.com/en/cql-oss/3.1/cql/cql_reference/compactSubprop.html