cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [3/4] git commit: Revert "don't change manifest level for cleanup, scrub, and upgradesstables under LCS"
Date Thu, 08 Mar 2012 08:48:09 GMT
Revert "don't change manifest level for cleanup, scrub, and upgradesstables under LCS"

This reverts commit 53fb52ac713e5471edd988b59cbd75f202a4f57b.


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

Branch: refs/heads/trunk
Commit: 09f091a62bd7e2165a2f26b469ee46b5d3bd285a
Parents: e4f7101
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Wed Mar 7 14:17:25 2012 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Thu Mar 8 09:36:53 2012 +0100

----------------------------------------------------------------------
 .../cassandra/db/compaction/LeveledManifest.java   |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/09f091a6/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 9bb6656..3c02cda 100644
--- a/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
+++ b/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
@@ -60,6 +60,7 @@ public class LeveledManifest
     private final Map<SSTableReader, Integer> sstableGenerations;
     private final RowPosition[] lastCompactedKeys;
     private final int maxSSTableSizeInMB;
+    private int levelCount;
 
     private LeveledManifest(ColumnFamilyStore cfs, int maxSSTableSizeInMB)
     {
@@ -175,13 +176,7 @@ public class LeveledManifest
         if (!added.iterator().hasNext())
             return;
 
-        // avoid increasing the level if we had a single source sstable involved.  This prevents
-        // cleanup, scrub, and upgradesstables from blowing through the level cap.
-        // See CASSANDRA-3989
-        int newLevel = Iterables.size(removed) == 1
-                     ? maximumLevel
-                     : minimumLevel == maximumLevel ? maximumLevel + 1 : maximumLevel;
-
+        int newLevel = minimumLevel == maximumLevel ? maximumLevel + 1 : maximumLevel;
         newLevel = skipLevels(newLevel, added);
         assert newLevel > 0;
         if (logger.isDebugEnabled())
@@ -325,7 +320,6 @@ public class LeveledManifest
 
     private void add(SSTableReader sstable, int level)
     {
-        assert level < generations.length : "Invalid level " + level + " out of " + (generations.length
- 1);
         generations[level].add(sstable);
         sstableGenerations.put(sstable, Integer.valueOf(level));
     }


Mime
View raw message