cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-5074) Add an official way to disable compaction
Date Tue, 09 Apr 2013 14:46:16 GMT

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

Sylvain Lebresne commented on CASSANDRA-5074:
---------------------------------------------

bq. i also removed a call to cfs.setCompactionThresholds in the STCS constructor, couldn't
find a reason it was there

Back in the days (like 1.0 old, when dinosaurs where roaming the earth), we used to set the
min/max thresholds to 0/Integer.MAX_VALUE in LCS. So STCS needed to restore the settings to
sane levels in case we were switching from LCS to STCS. But since then we've fixed our ways
(in CASSANDRA-4233 apparently, thanks git pickaxe) so this is just some leftover. It's fine
removing it and you can even remove the comment the patch adds imo.

bq. if there is a better way of disallowing min/max thresholds = 0 than checking in cql, cql3
and cli

Not really.

Otherwise, I've just realized that following CASSANDRA-3430, we need to check the ACS.isActive
flag *within* getNextBackgroundTask (with the synchronized block in particular) otherwise
it could be racy. So I think we should move back the isAutoCompactionDisabled check from CompactionManager
to STCS/LCS.getNextBackgroundTask (it's fine to keep the check at the beginning of CompactionManager.submitBackground
however, no point is pushing tasks that will do nothing on the executor). My bad for suggesting
otherwise.

But with the above fixed, +1.

Nit: could be nice to preserve the comment in CFS.disableAutoCompaction(), it's still useful.

                
> Add an official way to disable compaction
> -----------------------------------------
>
>                 Key: CASSANDRA-5074
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5074
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Jonathan Ellis
>            Assignee: Marcus Eriksson
>            Priority: Minor
>             Fix For: 2.0
>
>         Attachments: 0001-CASSANDRA-5074-make-it-possible-to-disable-autocompa.patch,
0001-CASSANDRA-5074-v2.patch
>
>
> We've traditionally used "min or max compaction threshold = 0" to disable compaction,
but this isn't exactly intuitive and it's inconsistently implemented -- allowed from jmx,
not allowed from cli.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message