I read the doc
troubleshooting/pointless-compactions
here is my table schema
ALTER TABLE foo.bar WITH compaction = {'class' : 'LeveledCompactionStrategy','tombstone_threshold' : 0.1,'sstable_size_in_mb' : 160, 'tombstone_compaction_interval': 60}
AND gc_grace_seconds = 60 ;
I expected scylla will check sstable’s Estimated droppable tombstones
every 60s
if Estimated droppable tombstones
> 0.1
then will exec minor compact for this table
but in my test
after I delete data
scylla don’t exec minor compact
or should I write same primary key, when scylla flush to sstable then will trigger minor compact ?
tombstone_compaction_interval
is a lower-bound on the earliest time a new tombstone compaction can be started. Meaning that if an sstable was compacted at time X
, the earliest time it will be considered for tombstone compaction again is X + tombstone_compaction_interval
. This is not a guarantee that sstables will be considered for compaction immediately after tombstone_compaction_interval
time has elapsed.
I think in your test, you might have too little data or too little tombstones. It is hard to say why tombstone compaction is not triggering, without more details.
1 Like
@denesb I want to understand the trigger mechanism for compaction. I tested it by setting tombstone_compaction_interval
to 120, which is 2 minutes, but I’ve observed that sometimes the compaction doesn’t happen at fixed intervals. What is the logic in the source code for this? How often does it scan?