cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marc...@apache.org
Subject [1/3] git commit: Add property to disable stcs in L0
Date Thu, 03 Jul 2014 12:30:49 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 047c67efb -> a0bfdebca


Add property to disable stcs in L0

Patch by marcuse; reviewed by tjake for CASSANDRA-6621


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f39cb073
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f39cb073
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f39cb073

Branch: refs/heads/cassandra-2.1
Commit: f39cb073ac0ecd68a3df4b60c43d6b0b8f3e8de6
Parents: 4c95d08
Author: Marcus Eriksson <marcuse@apache.org>
Authored: Fri Jun 27 08:56:50 2014 +0200
Committer: Marcus Eriksson <marcuse@apache.org>
Committed: Thu Jul 3 14:19:50 2014 +0200

----------------------------------------------------------------------
 CHANGES.txt                                                 | 1 +
 NEWS.txt                                                    | 9 +++++++++
 .../org/apache/cassandra/config/DatabaseDescriptor.java     | 5 +++++
 .../org/apache/cassandra/db/compaction/LeveledManifest.java | 3 ++-
 4 files changed, 17 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f39cb073/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 6b93631..94bea7b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -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:
 
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f39cb073/NEWS.txt
----------------------------------------------------------------------
diff --git a/NEWS.txt b/NEWS.txt
index 0fbc20f..ea085ae 100644
--- a/NEWS.txt
+++ b/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
 =====
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f39cb073/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index badd975..bf0307b 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -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;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f39cb073/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java b/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
index 1118ddc..70e5cae 100644
--- a/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
+++ b/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
@@ -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));


Mime
View raw message