mirror of https://github.com/apache/cassandra
Add property to disable stcs in L0
Patch by marcuse; reviewed by tjake for CASSANDRA-6621
This commit is contained in:
parent
4c95d08480
commit
f39cb073ac
|
|
@ -8,6 +8,7 @@
|
|||
* Fix AssertionError when using empty clustering columns and static columns
|
||||
(CASSANDRA-7455)
|
||||
* Add inter_dc_stream_throughput_outbound_megabits_per_sec (CASSANDRA-6596)
|
||||
* Add option to disable STCS in L0 (CASSANDRA-6621)
|
||||
Merged from 1.2:
|
||||
|
||||
|
||||
|
|
|
|||
9
NEWS.txt
9
NEWS.txt
|
|
@ -13,6 +13,15 @@ restore snapshots created with the previous major version using the
|
|||
'sstableloader' tool. You can upgrade the file format of your snapshots
|
||||
using the provided 'sstableupgrade' tool.
|
||||
|
||||
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
|
||||
=====
|
||||
|
||||
|
|
|
|||
|
|
@ -904,6 +904,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;
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ 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;
|
||||
|
|
@ -267,7 +268,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 (generations[0].size() > MAX_COMPACTING_L0)
|
||||
if (!DatabaseDescriptor.getDisableSTCSInL0() && generations[0].size() > MAX_COMPACTING_L0)
|
||||
{
|
||||
Iterable<SSTableReader> candidates = cfs.getDataTracker().getUncompactingSSTables(generations[0]);
|
||||
List<Pair<SSTableReader,Long>> pairs = SizeTieredCompactionStrategy.createSSTableAndLengthPairs(AbstractCompactionStrategy.filterSuspectSSTables(candidates));
|
||||
|
|
|
|||
Loading…
Reference in New Issue