You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2013/10/18 00:11:47 UTC

[1/6] git commit: Add a warning for small LCS sstable size patch by jbellis; reviewed by Jeremiah Jordan for CASSANDRA-6191

Updated Branches:
  refs/heads/cassandra-1.2 bcb9edcf5 -> c5368c70f
  refs/heads/cassandra-2.0 a15d57b7d -> 229da3725
  refs/heads/trunk 712615e71 -> 78cad84ae


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/cassandra-1.2
Commit: c5368c70f2febb2f37682baf8c013ad856d56a46
Parents: bcb9edc
Author: Jonathan Ellis <jb...@apache.org>
Authored: Thu Oct 17 23:09:36 2013 +0100
Committer: Jonathan Ellis <jb...@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());
                 }
             }
         }


[6/6] git commit: Merge branch 'cassandra-2.0' into trunk

Posted by jb...@apache.org.
Merge branch 'cassandra-2.0' into trunk


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

Branch: refs/heads/trunk
Commit: 78cad84aee38c4682a6badb5c482e4fb84dc2df5
Parents: 712615e 229da37
Author: Jonathan Ellis <jb...@apache.org>
Authored: Thu Oct 17 23:11:41 2013 +0100
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Thu Oct 17 23:11:41 2013 +0100

----------------------------------------------------------------------
 CHANGES.txt                                     |  4 +---
 build.xml                                       |  3 +++
 .../compaction/LeveledCompactionStrategy.java   | 20 ++++++++++++++++++++
 3 files changed, 24 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/78cad84a/CHANGES.txt
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/78cad84a/build.xml
----------------------------------------------------------------------


[3/6] git commit: Add a warning for small LCS sstable size patch by jbellis; reviewed by Jeremiah Jordan for CASSANDRA-6191

Posted by jb...@apache.org.
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 <jb...@apache.org>
Authored: Thu Oct 17 23:09:36 2013 +0100
Committer: Jonathan Ellis <jb...@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());
                 }
             }
         }


[2/6] git commit: Add a warning for small LCS sstable size patch by jbellis; reviewed by Jeremiah Jordan for CASSANDRA-6191

Posted by jb...@apache.org.
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/cassandra-2.0
Commit: c5368c70f2febb2f37682baf8c013ad856d56a46
Parents: bcb9edc
Author: Jonathan Ellis <jb...@apache.org>
Authored: Thu Oct 17 23:09:36 2013 +0100
Committer: Jonathan Ellis <jb...@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());
                 }
             }
         }


[5/6] git commit: merge from 1.2

Posted by jb...@apache.org.
merge from 1.2


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

Branch: refs/heads/cassandra-2.0
Commit: 229da3725637fa0dae07477e3bdb00c3d1876e84
Parents: a15d57b c5368c7
Author: Jonathan Ellis <jb...@apache.org>
Authored: Thu Oct 17 23:10:38 2013 +0100
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Thu Oct 17 23:10:38 2013 +0100

----------------------------------------------------------------------
 CHANGES.txt                                     |  4 +---
 build.xml                                       |  3 +++
 .../compaction/LeveledCompactionStrategy.java   | 20 ++++++++++++++++++++
 3 files changed, 24 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/229da372/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index ad38cd3,0a8db61..b551400
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,28 -1,5 +1,29 @@@
 -1.2.11
 +2.0.2
 + * Fix FileCacheService regressions (CASSANDRA-6149)
 + * Never return WriteTimeout for CL.ANY (CASSANDRA-6032)
 + * Fix race conditions in bulk loader (CASSANDRA-6129)
 + * Add configurable metrics reporting (CASSANDRA-4430)
 + * drop queries exceeding a configurable number of tombstones (CASSANDRA-6117)
 + * Track and persist sstable read activity (CASSANDRA-5515)
 + * Fixes for speculative retry (CASSANDRA-5932)
 + * Improve memory usage of metadata min/max column names (CASSANDRA-6077)
 + * Fix thrift validation refusing row markers on CQL3 tables (CASSANDRA-6081)
 + * Fix insertion of collections with CAS (CASSANDRA-6069)
 + * Correctly send metadata on SELECT COUNT (CASSANDRA-6080)
 + * Track clients' remote addresses in ClientState (CASSANDRA-6070)
 + * Create snapshot dir if it does not exist when migrating
 +   leveled manifest (CASSANDRA-6093)
 + * make sequential nodetool repair the default (CASSANDRA-5950)
 + * Add more hooks for compaction strategy implementations (CASSANDRA-6111)
 + * Fix potential NPE on composite 2ndary indexes (CASSANDRA-6098)
 + * Delete can potentially be skipped in batch (CASSANDRA-6115)
 + * Allow alter keyspace on system_traces (CASSANDRA-6016)
 + * Disallow empty column names in cql (CASSANDRA-6136)
 + * Use Java7 file-handling APIs and fix file moving on Windows (CASSANDRA-5383)
 + * Save compaction history to system keyspace (CASSANDRA-5078)
 + * Fix NPE if StorageService.getOperationMode() is executed before full startup (CASSANDRA-6166)
 +Merged from 1.2:
+  * 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)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/229da372/build.xml
----------------------------------------------------------------------
diff --cc build.xml
index 5e7f269,43e0919..2703edf
--- a/build.xml
+++ b/build.xml
@@@ -1075,8 -1112,8 +1075,9 @@@
      <testmacro suitename="unit" inputdir="${test.unit.src}" timeout="60000">
        <jvmarg value="-Dlegacy-sstable-root=${test.data}/legacy-sstables"/>
        <jvmarg value="-Dcorrupt-sstable-root=${test.data}/corrupt-sstables"/>
 +      <jvmarg value="-Dmigration-sstable-root=${test.data}/migration-sstables"/>
        <jvmarg value="-Dcassandra.ring_delay_ms=1000"/>
+       <jvmarg value="-Dcassandra.tolerate_sstable_size=true"/>
      </testmacro>
    </target>
      
@@@ -1084,9 -1121,9 +1085,10 @@@
      <testmacro suitename="unit" inputdir="${test.unit.src}" timeout="60000">
        <jvmarg value="-Dlegacy-sstable-root=${test.data}/legacy-sstables"/>
        <jvmarg value="-Dcorrupt-sstable-root=${test.data}/corrupt-sstables"/>
 +      <jvmarg value="-Dmigration-sstable-root=${test.data}/migration-sstables"/>
        <jvmarg value="-Dcassandra.test.compression=true"/>
        <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/229da372/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
index 522aef9,95bd6ed..f5a60e0
--- a/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
+++ b/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
@@@ -53,14 -53,20 +53,34 @@@ public class LeveledCompactionStrategy 
      {
          super(cfs, options);
          int configuredMaxSSTableSize = 160;
 -        if (options != null)
 +        SizeTieredCompactionStrategyOptions localOptions = new SizeTieredCompactionStrategyOptions(options);
 +        if (options.containsKey(SSTABLE_SIZE_OPTION))
          {
 -            if (options.containsKey(SSTABLE_SIZE_OPTION))
 +            configuredMaxSSTableSize = Integer.parseInt(options.get(SSTABLE_SIZE_OPTION));
 +            if (configuredMaxSSTableSize >= 1000)
              {
++<<<<<<< HEAD
 +                // 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);
++||||||| merged common ancestors
++                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);
++                }
++=======
+                 configuredMaxSSTableSize = Integer.parseInt(options.get(SSTABLE_SIZE_OPTION));
+                 if (!Boolean.getBoolean("cassandra.tolerate_sstable_size"))
+                 {
+                     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());
+                 }
++>>>>>>> cassandra-1.2
              }
          }
          maxSSTableSizeInMB = configuredMaxSSTableSize;


[4/6] git commit: merge from 1.2

Posted by jb...@apache.org.
merge from 1.2


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

Branch: refs/heads/trunk
Commit: 229da3725637fa0dae07477e3bdb00c3d1876e84
Parents: a15d57b c5368c7
Author: Jonathan Ellis <jb...@apache.org>
Authored: Thu Oct 17 23:10:38 2013 +0100
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Thu Oct 17 23:10:38 2013 +0100

----------------------------------------------------------------------
 CHANGES.txt                                     |  4 +---
 build.xml                                       |  3 +++
 .../compaction/LeveledCompactionStrategy.java   | 20 ++++++++++++++++++++
 3 files changed, 24 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/229da372/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index ad38cd3,0a8db61..b551400
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,28 -1,5 +1,29 @@@
 -1.2.11
 +2.0.2
 + * Fix FileCacheService regressions (CASSANDRA-6149)
 + * Never return WriteTimeout for CL.ANY (CASSANDRA-6032)
 + * Fix race conditions in bulk loader (CASSANDRA-6129)
 + * Add configurable metrics reporting (CASSANDRA-4430)
 + * drop queries exceeding a configurable number of tombstones (CASSANDRA-6117)
 + * Track and persist sstable read activity (CASSANDRA-5515)
 + * Fixes for speculative retry (CASSANDRA-5932)
 + * Improve memory usage of metadata min/max column names (CASSANDRA-6077)
 + * Fix thrift validation refusing row markers on CQL3 tables (CASSANDRA-6081)
 + * Fix insertion of collections with CAS (CASSANDRA-6069)
 + * Correctly send metadata on SELECT COUNT (CASSANDRA-6080)
 + * Track clients' remote addresses in ClientState (CASSANDRA-6070)
 + * Create snapshot dir if it does not exist when migrating
 +   leveled manifest (CASSANDRA-6093)
 + * make sequential nodetool repair the default (CASSANDRA-5950)
 + * Add more hooks for compaction strategy implementations (CASSANDRA-6111)
 + * Fix potential NPE on composite 2ndary indexes (CASSANDRA-6098)
 + * Delete can potentially be skipped in batch (CASSANDRA-6115)
 + * Allow alter keyspace on system_traces (CASSANDRA-6016)
 + * Disallow empty column names in cql (CASSANDRA-6136)
 + * Use Java7 file-handling APIs and fix file moving on Windows (CASSANDRA-5383)
 + * Save compaction history to system keyspace (CASSANDRA-5078)
 + * Fix NPE if StorageService.getOperationMode() is executed before full startup (CASSANDRA-6166)
 +Merged from 1.2:
+  * 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)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/229da372/build.xml
----------------------------------------------------------------------
diff --cc build.xml
index 5e7f269,43e0919..2703edf
--- a/build.xml
+++ b/build.xml
@@@ -1075,8 -1112,8 +1075,9 @@@
      <testmacro suitename="unit" inputdir="${test.unit.src}" timeout="60000">
        <jvmarg value="-Dlegacy-sstable-root=${test.data}/legacy-sstables"/>
        <jvmarg value="-Dcorrupt-sstable-root=${test.data}/corrupt-sstables"/>
 +      <jvmarg value="-Dmigration-sstable-root=${test.data}/migration-sstables"/>
        <jvmarg value="-Dcassandra.ring_delay_ms=1000"/>
+       <jvmarg value="-Dcassandra.tolerate_sstable_size=true"/>
      </testmacro>
    </target>
      
@@@ -1084,9 -1121,9 +1085,10 @@@
      <testmacro suitename="unit" inputdir="${test.unit.src}" timeout="60000">
        <jvmarg value="-Dlegacy-sstable-root=${test.data}/legacy-sstables"/>
        <jvmarg value="-Dcorrupt-sstable-root=${test.data}/corrupt-sstables"/>
 +      <jvmarg value="-Dmigration-sstable-root=${test.data}/migration-sstables"/>
        <jvmarg value="-Dcassandra.test.compression=true"/>
        <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/229da372/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
index 522aef9,95bd6ed..f5a60e0
--- a/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
+++ b/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
@@@ -53,14 -53,20 +53,34 @@@ public class LeveledCompactionStrategy 
      {
          super(cfs, options);
          int configuredMaxSSTableSize = 160;
 -        if (options != null)
 +        SizeTieredCompactionStrategyOptions localOptions = new SizeTieredCompactionStrategyOptions(options);
 +        if (options.containsKey(SSTABLE_SIZE_OPTION))
          {
 -            if (options.containsKey(SSTABLE_SIZE_OPTION))
 +            configuredMaxSSTableSize = Integer.parseInt(options.get(SSTABLE_SIZE_OPTION));
 +            if (configuredMaxSSTableSize >= 1000)
              {
++<<<<<<< HEAD
 +                // 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);
++||||||| merged common ancestors
++                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);
++                }
++=======
+                 configuredMaxSSTableSize = Integer.parseInt(options.get(SSTABLE_SIZE_OPTION));
+                 if (!Boolean.getBoolean("cassandra.tolerate_sstable_size"))
+                 {
+                     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());
+                 }
++>>>>>>> cassandra-1.2
              }
          }
          maxSSTableSizeInMB = configuredMaxSSTableSize;