cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vijay <vijay2...@gmail.com>
Subject Re: Safely Disabling Compaction
Date Fri, 18 May 2012 03:09:08 GMT
I would rather set the Keyspace setting min_compaction_threshold
and max_compaction_threshold to be a higher number and once i am ready i
will put the value back... This way i dont need to restart.
Having said that why not set the compaction throughput to 1 (low enough to
not have contention) and complete the stream?

Regards,
</VJ>



On Wed, May 16, 2012 at 2:43 PM, sj.climber <sj.climber@gmail.com> wrote:

> Hi,
>
> In an effort to minimize IO contention, I'd like to disable compactions
> while I'm streaming SSTables to the cluster.  When done streaming, I intend
> on forcing a major compaction through nodetool.
>
> Elsewhere in the forums, various folks suggest setting
> max_compaction_threshold = 0 to disable compaction.  While this works
> sometimes (via 'update column family <family> with
> max_compaction_threshold=0'), I've observed a number of serious issues with
> this approach:
>
> 1) You can't create a column family with max_compaction_threshold = 0.  The
> CLI reports that min_compaction_threshold must have a value >= 2, and
> max_compaction_threshold can't be lower than it.  Worse yet, trying to
> create a column family with max_compaction_threshold = 0 gets the cluster
> into a Schema Disagreement Exception (since the node on which you issue the
> migration command fails with a fatal error).
>
> 2) Cassandra will allow me to update an existing column family with
> max_compaction_threshold = 0.  But if I restart the node, it will crash on
> startup.
> java.lang.reflect.InvocationTargetException
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at
> org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:160)
> Caused by: java.lang.RuntimeException:
> java.lang.reflect.InvocationTargetException
> ...
>
> org.apache.cassandra.config.CFMetaData.createCompactionStrategyInstance(CFMetaData.java:839)
>        ... 14 more
> Caused by: java.lang.RuntimeException: The max_compaction_threshold cannot
> be smaller than the min.
>        at
>
> org.apache.cassandra.db.ColumnFamilyStore.setMaximumCompactionThreshold(ColumnFamilyStore.java:1740)
>        at org.apache.
>
>
> Is there another solution for more safely enabling/disabling compaction?
>
> Thanks!
>
> --
> View this message in context:
> http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Safely-Disabling-Compaction-tp7562777.html
> Sent from the cassandra-user@incubator.apache.org mailing list archive at
> Nabble.com.
>

Mime
View raw message