cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [16/17] git commit: Revert "don't change manifest level for cleanup, scrub, and upgradesstables under LCS"
Date Tue, 13 Mar 2012 13:16:58 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/c7895e99
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c7895e99
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c7895e99

Branch: refs/heads/trunk
Commit: c7895e99fb86ae3c36b4d63634498662ba20c220
Parents: e8b4442
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Wed Mar 7 14:17:25 2012 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Wed Mar 7 14:17:25 2012 +0100

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c7895e99/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 6e57f35..91c45dc 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,4 @@
 1.0.9
- * don't change manifest level for cleanup, scrub, and upgradesstables
-   operations under LeveledCompactionStrategy (CASSANDRA-3989)
  * always compact away deleted hints immediately after handoff (CASSANDRA-3955)
  * delete hints from dropped ColumnFamilies on handoff instead of
    erroring out (CASSANDRA-3975)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c7895e99/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 d74421f..189de8e 100644
--- a/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
+++ b/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java
@@ -61,6 +61,7 @@ public class LeveledManifest
     private final List<SSTableReader>[] generations;
     private final DecoratedKey[] lastCompactedKeys;
     private final int maxSSTableSizeInMB;
+    private int levelCount;
 
     private LeveledManifest(ColumnFamilyStore cfs, int maxSSTableSizeInMB)
     {
@@ -174,13 +175,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())
@@ -300,7 +295,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);
     }
 


Mime
View raw message