cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Ivakov (JIRA)" <>
Subject [jira] [Updated] (CASSANDRA-14496) TWCS erroneously disabling tombstone compactions when unchecked_tombstone_compaction=true
Date Thu, 21 Jun 2018 06:29:00 GMT


Alexander Ivakov updated CASSANDRA-14496:
    Status: Patch Available  (was: In Progress)


Attaching a patch for the above. Simply checking if unchecked_tombstone_compactions is set
to true, regardless of tombstone_compaction_interval and tombstone_threshold being set. Also
added a unit test.

> TWCS erroneously disabling tombstone compactions when unchecked_tombstone_compaction=true
> -----------------------------------------------------------------------------------------
>                 Key: CASSANDRA-14496
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Compaction
>            Reporter: Robert Tarrall
>            Assignee: Alexander Ivakov
>            Priority: Minor
> 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 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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message