[ 
https://issues.apache.org/jira/browse/CASSANDRA-14496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17373606#comment-17373606
 ] 

Brandon Williams commented on CASSANDRA-14496:
----------------------------------------------

You're right, I've misread the logic.

bq. Shouldn't we enable tombstone compactions if any of those 3 options is 
explicitly set?

Yep.  I've changed the patch to enable it if any of those is set and not equal 
to "false" here:

||Branch||CI||
|[3.11|https://github.com/driftx/cassandra/tree/CASSANDRA-14496]|[circle|https://app.circleci.com/pipelines/github/driftx/cassandra?branch=CASSANDRA-14496]|
|[4.0|https://github.com/driftx/cassandra/tree/CASSANDRA-14496-4.0]|[circle|https://app.circleci.com/pipelines/github/driftx/cassandra?branch=CASSANDRA-14496-4.0]|
|[trunk|https://github.com/driftx/cassandra/tree/CASSANDRA-14496-trunk]|[circle|https://app.circleci.com/pipelines/github/driftx/cassandra?branch=CASSANDRA-14496-trunk]|




> TWCS erroneously disabling tombstone compactions when 
> unchecked_tombstone_compaction=true
> -----------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-14496
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14496
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Local/Compaction
>            Reporter: Robert Tarrall
>            Assignee: Alexander Ivakov
>            Priority: Low
>             Fix For: 3.11.x, 4.0.x, 4.x
>
>
> This code:
> {code:java}
> this.options = new TimeWindowCompactionStrategyOptions(options);
> if 
> (!options.containsKey(AbstractCompactionStrategy.TOMBSTONE_COMPACTION_INTERVAL_OPTION)
>  && 
> !options.containsKey(AbstractCompactionStrategy.TOMBSTONE_THRESHOLD_OPTION))
> {
> disableTombstoneCompactions = true;
> logger.debug("Disabling tombstone compactions for TWCS");
> }
> else
> logger.debug("Enabling tombstone compactions for TWCS");
> }
> {code}
> ... in TimeWindowCompactionStrategy.java disables tombstone compactions in 
> TWCS if you have not *explicitly* set either tombstone_compaction_interval or 
> tombstone_threshold.  Adding 'tombstone_compaction_interval': '86400' to the 
> compaction stanza in a table definition has the (to me unexpected) side 
> effect of enabling tombstone compactions. 
> This is surprising and does not appear to be mentioned in the docs.
> I would suggest that tombstone compactions should be run unless these options 
> are both set to 0.
> If the concern is that (as with DTCS in CASSANDRA-9234) we don't want to 
> waste time on tombstone compactions when we expect the tables to eventually 
> be expired away, perhaps we should also check unchecked_tombstone_compaction 
> and still enable tombstone compactions if that's set to true.
> May also make sense to set defaults for interval & threshold to 0 & disable 
> if they're nonzero so that setting non-default values, rather than setting 
> ANY value, is what determines whether tombstone compactions are enabled?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to