cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [5/5] git commit: CFS.setMaxCompactionThreshold doesn't allow 0 unless min is also 0
Date Thu, 22 Mar 2012 12:50:58 GMT
CFS.setMaxCompactionThreshold doesn't allow 0 unless min is also 0

patch by slebresne; reviewed by jbellis for CASSANDRA-4070


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

Branch: refs/heads/trunk
Commit: 5a3d4c14b2f7e804c74c04c6e0b229c50649e7bd
Parents: c573c46
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Thu Mar 22 13:42:22 2012 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Thu Mar 22 13:42:22 2012 +0100

----------------------------------------------------------------------
 .../org/apache/cassandra/db/ColumnFamilyStore.java |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5a3d4c14/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 60a3487..9c790ae 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -1739,7 +1739,7 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
 
     public void setMaximumCompactionThreshold(int maxCompactionThreshold)
     {
-        if (maxCompactionThreshold < this.minCompactionThreshold.value())
+        if (maxCompactionThreshold > 0 && maxCompactionThreshold < this.minCompactionThreshold.value())
         {
             throw new RuntimeException("The max_compaction_threshold cannot be smaller than
the min.");
         }


Mime
View raw message