cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [22/22] git commit: kick off background compaction when min/max thresholds change patch by jbellis; reviewed by slebresne for CASSANDRA-4279
Date Sat, 26 May 2012 05:25:46 GMT
kick off background compaction when min/max thresholds change
patch by jbellis; reviewed by slebresne for CASSANDRA-4279


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

Branch: refs/heads/cassandra-1.1
Commit: 00a553438623945117066d4adfc2826c17d59ccb
Parents: f89b9ae
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Fri May 25 15:49:49 2012 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Fri May 25 15:49:49 2012 -0500

----------------------------------------------------------------------
 CHANGES.txt                                        |    2 ++
 .../org/apache/cassandra/db/ColumnFamilyStore.java |    8 ++++----
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/00a55343/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 15f3c8a..404a744 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,8 @@
 1.0.11
  * synchronize LCS getEstimatedTasks to avoid CME (CASSANDRA-4255)
  * ensure unique streaming session id's (CASSANDRA-4223)
+ * kick off background compaction when min/max thresholds change 
+   (CASSANDRA-4279)
 
 
 1.0.10

http://git-wip-us.apache.org/repos/asf/cassandra/blob/00a55343/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index b7d74bc..56de67e 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -1727,10 +1727,10 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
     public void setMinimumCompactionThreshold(int minCompactionThreshold)
     {
         if ((minCompactionThreshold > this.maxCompactionThreshold.value()) &&
this.maxCompactionThreshold.value() != 0)
-        {
             throw new RuntimeException("The min_compaction_threshold cannot be larger than
the max.");
-        }
+
         this.minCompactionThreshold.set(minCompactionThreshold);
+        CompactionManager.instance.submitBackground(this);
     }
 
     public int getMaximumCompactionThreshold()
@@ -1741,10 +1741,10 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
     public void setMaximumCompactionThreshold(int maxCompactionThreshold)
     {
         if (maxCompactionThreshold > 0 && maxCompactionThreshold < this.minCompactionThreshold.value())
-        {
             throw new RuntimeException("The max_compaction_threshold cannot be smaller than
the min.");
-        }
+
         this.maxCompactionThreshold.set(maxCompactionThreshold);
+        CompactionManager.instance.submitBackground(this);
     }
 
     public boolean isCompactionDisabled()


Mime
View raw message