Updated Branches:
  refs/heads/trunk d28034916 -> 6362b9461

update default LCS sstable size to 160MB
patch by jbellis based on tests by Daniel Meyer for CASSANDRA-5727


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

Branch: refs/heads/trunk
Commit: d2f43e41cad76fccc666b0d90ef9a20df221e22e
Parents: 00b96f8
Author: Jonathan Ellis <jbel...@apache.org>
Authored: Mon Jul 29 14:18:28 2013 -0500
Committer: Jonathan Ellis <jbel...@apache.org>
Committed: Mon Jul 29 14:18:28 2013 -0500

----------------------------------------------------------------------
 CHANGES.txt                                           |  4 ++++
 .../db/compaction/LeveledCompactionStrategy.java      | 14 ++++++++------
 2 files changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d2f43e41/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index e2502e1..9a348f1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,7 @@
+1.2.9
+ * update default LCS sstable size to 160MB (CASSANDRA-5727)
+
+
 1.2.8
  * Fix reading DeletionTime from 1.1-format sstables (CASSANDRA-5814)
  * cqlsh: add collections support to COPY (CASSANDRA-5698)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d2f43e41/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 52c03fc..f9d8964 100644
--- a/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
+++ b/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
@@ -52,15 +52,17 @@ public class LeveledCompactionStrategy extends 
AbstractCompactionStrategy implem
     public LeveledCompactionStrategy(ColumnFamilyStore cfs, Map<String, 
String> options)
     {
         super(cfs, options);
-        int configuredMaxSSTableSize = 5;
+        int configuredMaxSSTableSize = 160;
         if (options != null)
         {
-            String value = options.containsKey(SSTABLE_SIZE_OPTION) ? 
options.get(SSTABLE_SIZE_OPTION) : "5";
-            configuredMaxSSTableSize = Integer.parseInt(value);
-            if (configuredMaxSSTableSize >= 1000)
+            if (options.containsKey(SSTABLE_SIZE_OPTION))
             {
-                // Yes, people have done this
-                logger.warn("Max sstable size of {}MB is configured; having a 
unit of compaction this large is probably a bad idea", 
configuredMaxSSTableSize);
+                configuredMaxSSTableSize = 
Integer.parseInt(options.get(SSTABLE_SIZE_OPTION));
+                if (configuredMaxSSTableSize >= 1000)
+                {
+                    // Yes, people have done this
+                    logger.warn("Max sstable size of {}MB is configured; 
having a unit of compaction this large is probably a bad idea", 
configuredMaxSSTableSize);
+                }
             }
         }
         maxSSTableSizeInMB = configuredMaxSSTableSize;

Reply via email to