cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ifesdj...@apache.org
Subject cassandra git commit: Ninja: fix bad CASSANDRA-12526 rebase, revert to CASSANDRA-14388 MAX_COMPACTING_L0 logic.
Date Wed, 20 Jun 2018 13:51:07 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 73e70340a -> d0c2ab508


Ninja: fix bad CASSANDRA-12526 rebase, revert to CASSANDRA-14388 MAX_COMPACTING_L0 logic.


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

Branch: refs/heads/trunk
Commit: d0c2ab5088bddd279febfe17b509c367012789a9
Parents: 73e7034
Author: Alex Petrov <oleksandr.petrov@gmail.com>
Authored: Wed Jun 20 15:38:07 2018 +0200
Committer: Alex Petrov <oleksandr.petrov@gmail.com>
Committed: Wed Jun 20 15:41:30 2018 +0200

----------------------------------------------------------------------
 .../cassandra/db/compaction/LeveledCompactionStrategy.java   | 3 ---
 .../org/apache/cassandra/db/compaction/LeveledManifest.java  | 8 +++++++-
 2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d0c2ab50/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java b/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
index a65a20e..3437094 100644
--- a/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
+++ b/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
@@ -596,9 +596,6 @@ public class LeveledCompactionStrategy extends AbstractCompactionStrategy
         uncheckedOptions.remove(CompactionParams.Option.MIN_THRESHOLD.toString());
         uncheckedOptions.remove(CompactionParams.Option.MAX_THRESHOLD.toString());
 
-        uncheckedOptions.remove(CompactionParams.Option.MIN_THRESHOLD.toString());
-        uncheckedOptions.remove(CompactionParams.Option.MAX_THRESHOLD.toString());
-
         uncheckedOptions = SizeTieredCompactionStrategyOptions.validateOptions(options, uncheckedOptions);
 
         return uncheckedOptions;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d0c2ab50/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 c01dd69..ac45d0d 100644
--- a/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
+++ b/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
@@ -49,6 +49,12 @@ public class LeveledManifest
     private static final Logger logger = LoggerFactory.getLogger(LeveledManifest.class);
 
     /**
+     * if we have more than MAX_COMPACTING_L0 sstables in L0, we will run a round of STCS
with at most
+     * cfs.getMaxCompactionThreshold() sstables.
+     */
+    private static final int MAX_COMPACTING_L0 = 32;
+
+    /**
      * If we go this many rounds without compacting
      * in the highest level, we start bringing in sstables from
      * that level into lower level compactions
@@ -415,7 +421,7 @@ public class LeveledManifest
 
     private CompactionCandidate getSTCSInL0CompactionCandidate()
     {
-        if (!DatabaseDescriptor.getDisableSTCSInL0() && getLevel(0).size() > cfs.getMaximumCompactionThreshold())
+        if (!DatabaseDescriptor.getDisableSTCSInL0() && getLevel(0).size() > MAX_COMPACTING_L0)
         {
             List<SSTableReader> mostInteresting = getSSTablesForSTCS(getLevel(0));
             if (!mostInteresting.isEmpty())


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message