cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [3/6] git commit: Add a warning for small LCS sstable size patch by jbellis; reviewed by Jeremiah Jordan for CASSANDRA-6191
Date Thu, 17 Oct 2013 22:11:49 GMT
Add a warning for small LCS sstable size
patch by jbellis; reviewed by Jeremiah Jordan for CASSANDRA-6191


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

Branch: refs/heads/trunk
Commit: c5368c70f2febb2f37682baf8c013ad856d56a46
Parents: bcb9edc
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Thu Oct 17 23:09:36 2013 +0100
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Thu Oct 17 23:09:36 2013 +0100

----------------------------------------------------------------------
 CHANGES.txt                                               |  6 ++----
 build.xml                                                 |  3 +++
 .../db/compaction/LeveledCompactionStrategy.java          | 10 +++++++---
 3 files changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c5368c70/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 0435d4e..0a8db61 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,10 +1,8 @@
-1.2.12
+1.2.11
+ * Add a warning for small LCS sstable size (CASSANDRA-6191)
  * Add ability to list specific KS/CF combinations in nodetool cfstats (CASSANDRA-4191)
  * Mark CF clean if a mutation raced the drop and got it marked dirty 
  * Add a LOCAL_ONE consistency level (CASSANDRA-6202)
-
-
-1.2.11
  * Limit CQL prepared statement cache by size instead of count (CASSANDRA-6107)
  * Tracing should log write failure rather than raw exceptions (CASSANDRA-6133)
  * lock access to TM.endpointToHostIdMap (CASSANDRA-6103)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c5368c70/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index 3742910..43e0919 100644
--- a/build.xml
+++ b/build.xml
@@ -1113,6 +1113,7 @@
       <jvmarg value="-Dlegacy-sstable-root=${test.data}/legacy-sstables"/>
       <jvmarg value="-Dcorrupt-sstable-root=${test.data}/corrupt-sstables"/>
       <jvmarg value="-Dcassandra.ring_delay_ms=1000"/>
+      <jvmarg value="-Dcassandra.tolerate_sstable_size=true"/>
     </testmacro>
   </target>
     
@@ -1122,6 +1123,7 @@
       <jvmarg value="-Dcorrupt-sstable-root=${test.data}/corrupt-sstables"/>
       <jvmarg value="-Dcassandra.test.compression=true"/>
       <jvmarg value="-Dcassandra.ring_delay_ms=1000"/>
+      <jvmarg value="-Dcassandra.tolerate_sstable_size=true"/>
     </testmacro>
   </target>
 
@@ -1160,6 +1162,7 @@
     <testmacro suitename="long" inputdir="${test.long.src}"
                timeout="${test.long.timeout}">
       <jvmarg value="-Dcassandra.ring_delay_ms=1000"/>
+      <jvmarg value="-Dcassandra.tolerate_sstable_size=true"/>
     </testmacro>
   </target>
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c5368c70/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 f9d8964..95bd6ed 100644
--- a/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
+++ b/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
@@ -58,10 +58,14 @@ public class LeveledCompactionStrategy extends AbstractCompactionStrategy
implem
             if (options.containsKey(SSTABLE_SIZE_OPTION))
             {
                 configuredMaxSSTableSize = Integer.parseInt(options.get(SSTABLE_SIZE_OPTION));
-                if (configuredMaxSSTableSize >= 1000)
+                if (!Boolean.getBoolean("cassandra.tolerate_sstable_size"))
                 {
-                    // 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);
+                    if (configuredMaxSSTableSize >= 1000)
+                        logger.warn("Max sstable size of {}MB is configured for {}.{}; having
a unit of compaction this large is probably a bad idea",
+                                    configuredMaxSSTableSize, cfs.table.name, cfs.getColumnFamilyName());
+                    if (configuredMaxSSTableSize < 50)
+                        logger.warn("Max sstable size of {}MB is configured for {}.{}.  Testing
done for CASSANDRA-5727 indicates that performance improves up to 160MB",
+                                    configuredMaxSSTableSize, cfs.table.name, cfs.getColumnFamilyName());
                 }
             }
         }


Mime
View raw message