[ https://issues.apache.org/jira/browse/CASSANDRA-5074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13580494#comment-13580494
]
Andrea Gazzarini commented on CASSANDRA-5074:
---------------------------------------------
Right, I agree...the simplest thing that could possibly work; but in my opinion there's still
something that needs to be changed: setting the min and / or max threshold, strictly speaking
doesn't disable the compaction, because is up to the concrete strategy implementor to check
that doing
if (cfs.isCompactionDisabled()) {
...
}
I think it should be better to move this responsibility to the superlayer.
So my suggestion is to change a little bit the AbstractCompactionStrategy in order to use
a template method. Something like this:
(AbstractCompactionStrategy)
{noformat}
final synchronized AbstractCompactionTask getNextBackgroundTask(final int gcBefore)
{
if (cfs.isCompactionDisabled()) {
doGetNextBackgroundTask(gcBefore);
}
}
...
abstract AbstractCompactionTask doGetNextBackgroundTask(final int gcBefore);
{noformat}
> 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
> Priority: Minor
> Fix For: 1.2.2
>
>
> 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
|