cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Tarrall (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-14496) TWCS erroneously disabling tombstone compactions
Date Wed, 06 Jun 2018 03:01:00 GMT

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

Robert Tarrall commented on CASSANDRA-14496:
--------------------------------------------

BTW rereading my original ticket here, I see I totally failed to mention {{unchecked_tombstone_compaction}}
which was really the key to why I opened the ticket.

To hopefully clarify: if {{unchecked_tombstone_compaction}} is set to true, tombstone compactions
should be enabled, even in TWCS.  We should not have to also set interval or threshold in
order to enable.

Also, it would probably be better to have maximally high default values for interval and
threshold to more correctly indicate default behavior.  The default isn't really 86400 and
0.2; it's "never".  That's the right choice for most TWCS users, but isn't clear from the
docs.

> TWCS erroneously disabling tombstone compactions
> ------------------------------------------------
>
>                 Key: CASSANDRA-14496
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14496
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Compaction
>            Reporter: Robert Tarrall
>            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 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
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message