Merge branch 'cassandra-2.1' into trunk

This commit is contained in:
Marcus Eriksson 2014-07-03 14:29:59 +02:00
commit 72c08f11a2
4 changed files with 19 additions and 1 deletions

View File

@ -34,6 +34,7 @@ Merged from 2.0:
* Make sure high level sstables get compacted (CASSANDRA-7414)
* Fix AssertionError when using empty clustering columns and static columns
(CASSANDRA-7455)
* Add option to disable STCS in L0 (CASSANDRA-6621)
* Upgrade to snappy-java 1.0.5.2 (CASSANDRA-7476)

View File

@ -80,6 +80,15 @@ Upgrading
- support for supercolumns has been removed from json2sstable
2.0.10
====
New features
------------
- If you are using Leveled Compaction, you can now disable doing size-tiered
compaction in L0 by starting Cassandra with -Dcassandra.disable_stcs_in_l0
(see CASSANDRA-6621 for details).
2.0.9
=====

View File

@ -995,6 +995,11 @@ public class DatabaseDescriptor
conf.compaction_throughput_mb_per_sec = value;
}
public static boolean getDisableSTCSInL0()
{
return Boolean.getBoolean("cassandra.disable_stcs_in_l0");
}
public static int getStreamThroughputOutboundMegabitsPerSec()
{
return conf.stream_throughput_outbound_megabits_per_sec;

View File

@ -31,6 +31,9 @@ import com.google.common.primitives.Ints;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.cassandra.config.CFMetaData;
import org.apache.cassandra.config.DatabaseDescriptor;
import org.apache.cassandra.config.Schema;
import org.apache.cassandra.db.ColumnFamilyStore;
import org.apache.cassandra.db.RowPosition;
import org.apache.cassandra.dht.Bounds;
@ -370,7 +373,7 @@ public class LeveledManifest
if (score > 1.001)
{
// before proceeding with a higher level, let's see if L0 is far enough behind to warrant STCS
if (getLevel(0).size() > MAX_COMPACTING_L0)
if (!DatabaseDescriptor.getDisableSTCSInL0() && getLevel(0).size() > MAX_COMPACTING_L0)
{
List<SSTableReader> mostInteresting = getSSTablesForSTCS(getLevel(0));
if (!mostInteresting.isEmpty())