[jira] [Commented] (CASSANDRA-14496) TWCS erroneously disabling tombstone compactions when unchecked_tombstone_compaction=true
[ https://issues.apache.org/jira/browse/CASSANDRA-14496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17373628#comment-17373628 ] Marcus Eriksson commented on CASSANDRA-14496: - +1 > 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: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14496) TWCS erroneously disabling tombstone compactions when unchecked_tombstone_compaction=true
[ https://issues.apache.org/jira/browse/CASSANDRA-14496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14496) TWCS erroneously disabling tombstone compactions when unchecked_tombstone_compaction=true
[ https://issues.apache.org/jira/browse/CASSANDRA-14496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17373264#comment-17373264 ] Marcus Eriksson commented on CASSANDRA-14496: - Shouldn't we enable tombstone compactions if any of those 3 options is explicitly set? Now we would force a user to use {{UNCHECKED_TOMBSTONE_COMPACTION_OPTION}} if they want to enable tombstone compactions at all for TWCS. > 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: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14496) TWCS erroneously disabling tombstone compactions when unchecked_tombstone_compaction=true
[ https://issues.apache.org/jira/browse/CASSANDRA-14496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17373074#comment-17373074 ] Brandon Williams commented on CASSANDRA-14496: -- Circle looks good, +1. /cc [~marcuse] > 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: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14496) TWCS erroneously disabling tombstone compactions when unchecked_tombstone_compaction=true
[ https://issues.apache.org/jira/browse/CASSANDRA-14496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17373022#comment-17373022 ] Brandon Williams commented on CASSANDRA-14496: -- ||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 > > 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: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14496) TWCS erroneously disabling tombstone compactions
[ https://issues.apache.org/jira/browse/CASSANDRA-14496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14496) TWCS erroneously disabling tombstone compactions
[ https://issues.apache.org/jira/browse/CASSANDRA-14496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16502639#comment-16502639 ] Robert Tarrall commented on CASSANDRA-14496: I definitely agree with respect to "don't enable by default." However, I believe if I have set {{unchecked_tombstone_compaction}} to true, I'm asking for these compactions. I may however be missing something – is there another purpose for that option? I.e. might someone else be setting that to true who would be surprised to find it enables tombstone compactions? I can't find any documentation which explains that {{'unchecked_tombstone_compaction': 'true'}} has no effect unless you also explicitly set other options, and I see discussions in blog posts that suggest people think that setting is how you enable tombstone compactions in TWCS, and I had to rummage around in source code for a while to work out why I wasn't getting those compactions. Coming at this from the other direction may help. If I have the following compaction defined: {code:java} 'class': 'org.apache.cassandra.db.compaction.TimeWindowCompactionStrategy', 'compaction_window_size': '1', 'compaction_window_unit': 'HOURS', 'unchecked_tombstone_compaction': 'true'{code} ... I don't get tombstone compactions. When I change that to: {code:java} 'class': 'org.apache.cassandra.db.compaction.TimeWindowCompactionStrategy', 'compaction_window_size': '1', 'compaction_window_unit': 'HOURS', 'tombstone_compaction_interval': '86400', 'unchecked_tombstone_compaction': 'true' {code} ... I have just switched from "no tombstone compactions" to "tombstone compactions". This seems like a surprising side effect – one would not expect that explicitly setting an option to its default value would change behavior like this. If there's another purpose for unchecked_tombstone_compaction, I'd recommend the defaults for TWCS make it clear that tombstone compactions intentionally act differently from STCS; instead of interval & threshold defaults of 86400 & 0.2, they should be infinitely high, and documented as such, so that you must specify non-default values in order to get tombstone compactions. > 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-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14496) TWCS erroneously disabling tombstone compactions
[ https://issues.apache.org/jira/browse/CASSANDRA-14496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16502045#comment-16502045 ] Jon Haddad commented on CASSANDRA-14496: I'm not a fan of enabling them by default. There's no value for the frequency that make any sense at all given that a TTL could either be 5 minutes or 5 years. If someone supplies the {{tombstone_compaction_interval}} I suppose it wouldn't be unreasonable to enable them. > 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-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org