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 2014/02/22 15:24:28 UTC

[1/3] git commit: Fix overflow of memtable_total_space_in_mb patch by Benedict Elliott Smith; reviewed by jbellis for CASSANDRA-6753

Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 a53d531ae -> 0510d4e5b
  refs/heads/trunk c5dd98663 -> 462082323


Fix overflow of memtable_total_space_in_mb
patch by Benedict Elliott Smith; reviewed by jbellis for CASSANDRA-6753


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

Branch: refs/heads/cassandra-2.1
Commit: 0510d4e5b9862ee46be67581334a6f98d066b7ab
Parents: a53d531
Author: Jonathan Ellis <jb...@apache.org>
Authored: Sat Feb 22 08:24:18 2014 -0600
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Sat Feb 22 08:24:18 2014 -0600

----------------------------------------------------------------------
 CHANGES.txt                                                 | 1 +
 .../org/apache/cassandra/config/DatabaseDescriptor.java     | 9 ++++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0510d4e5/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 2b07926..b1fedd2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.0-beta2
+ * Fix overflow of memtable_total_space_in_mb (CASSANDRA-6573)
  * Fix ABTC NPE (CASSANDRA-6692)
  * Allow nodetool to use a file or prompt for password (CASSANDRA-6660)
  * Fix AIOOBE when concurrently accessing ABSC (CASSANDRA-6742)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0510d4e5/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index a8f8d7f..930bbcc 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -265,6 +265,13 @@ public class DatabaseDescriptor
             throw new ConfigurationException("memtable_heap_space_in_mb must be positive");
         logger.info("Global memtable heap threshold is enabled at {}MB", conf.memtable_total_space_in_mb);
 
+        if (conf.memtable_cleanup_threshold < 0.01f)
+            throw new ConfigurationException("memtable_cleanup_threshold must be >= 0.01");
+        if (conf.memtable_cleanup_threshold > 0.99f)
+            throw new ConfigurationException("memtable_cleanup_threshold must be <= 0.99");
+        if (conf.memtable_cleanup_threshold < 0.1f)
+            logger.warn("memtable_cleanup_threshold is set very low, which may cause performance degradation");
+
         if (conf.memtable_flush_writers < 1)
             throw new ConfigurationException("memtable_flush_writers must be at least 1");
 
@@ -1420,7 +1427,7 @@ public class DatabaseDescriptor
         {
             return memtablePool
                    .getConstructor(long.class, float.class, Runnable.class)
-                   .newInstance(conf.memtable_total_space_in_mb << 20, conf.memtable_cleanup_threshold, new ColumnFamilyStore.FlushLargestColumnFamily());
+                   .newInstance(((long) conf.memtable_total_space_in_mb) << 20, conf.memtable_cleanup_threshold, new ColumnFamilyStore.FlushLargestColumnFamily());
         }
         catch (Exception e)
         {


[2/3] git commit: Fix overflow of memtable_total_space_in_mb patch by Benedict Elliott Smith; reviewed by jbellis for CASSANDRA-6753

Posted by jb...@apache.org.
Fix overflow of memtable_total_space_in_mb
patch by Benedict Elliott Smith; reviewed by jbellis for CASSANDRA-6753


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

Branch: refs/heads/trunk
Commit: 0510d4e5b9862ee46be67581334a6f98d066b7ab
Parents: a53d531
Author: Jonathan Ellis <jb...@apache.org>
Authored: Sat Feb 22 08:24:18 2014 -0600
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Sat Feb 22 08:24:18 2014 -0600

----------------------------------------------------------------------
 CHANGES.txt                                                 | 1 +
 .../org/apache/cassandra/config/DatabaseDescriptor.java     | 9 ++++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0510d4e5/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 2b07926..b1fedd2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.0-beta2
+ * Fix overflow of memtable_total_space_in_mb (CASSANDRA-6573)
  * Fix ABTC NPE (CASSANDRA-6692)
  * Allow nodetool to use a file or prompt for password (CASSANDRA-6660)
  * Fix AIOOBE when concurrently accessing ABSC (CASSANDRA-6742)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0510d4e5/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index a8f8d7f..930bbcc 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -265,6 +265,13 @@ public class DatabaseDescriptor
             throw new ConfigurationException("memtable_heap_space_in_mb must be positive");
         logger.info("Global memtable heap threshold is enabled at {}MB", conf.memtable_total_space_in_mb);
 
+        if (conf.memtable_cleanup_threshold < 0.01f)
+            throw new ConfigurationException("memtable_cleanup_threshold must be >= 0.01");
+        if (conf.memtable_cleanup_threshold > 0.99f)
+            throw new ConfigurationException("memtable_cleanup_threshold must be <= 0.99");
+        if (conf.memtable_cleanup_threshold < 0.1f)
+            logger.warn("memtable_cleanup_threshold is set very low, which may cause performance degradation");
+
         if (conf.memtable_flush_writers < 1)
             throw new ConfigurationException("memtable_flush_writers must be at least 1");
 
@@ -1420,7 +1427,7 @@ public class DatabaseDescriptor
         {
             return memtablePool
                    .getConstructor(long.class, float.class, Runnable.class)
-                   .newInstance(conf.memtable_total_space_in_mb << 20, conf.memtable_cleanup_threshold, new ColumnFamilyStore.FlushLargestColumnFamily());
+                   .newInstance(((long) conf.memtable_total_space_in_mb) << 20, conf.memtable_cleanup_threshold, new ColumnFamilyStore.FlushLargestColumnFamily());
         }
         catch (Exception e)
         {


[3/3] git commit: Merge branch 'cassandra-2.1' into trunk

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


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

Branch: refs/heads/trunk
Commit: 4620823232181806046c89de8a540090c996ce8e
Parents: c5dd986 0510d4e
Author: Jonathan Ellis <jb...@apache.org>
Authored: Sat Feb 22 08:24:25 2014 -0600
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Sat Feb 22 08:24:25 2014 -0600

----------------------------------------------------------------------
 CHANGES.txt                                                 | 1 +
 .../org/apache/cassandra/config/DatabaseDescriptor.java     | 9 ++++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/46208232/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 5a8d068,b1fedd2..2a1cf17
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,8 -1,5 +1,9 @@@
 +3.0
 + * Remove CQL2 (CASSANDRA-5918)
 +
 +
  2.1.0-beta2
+  * Fix overflow of memtable_total_space_in_mb (CASSANDRA-6573)
   * Fix ABTC NPE (CASSANDRA-6692)
   * Allow nodetool to use a file or prompt for password (CASSANDRA-6660)
   * Fix AIOOBE when concurrently accessing ABSC (CASSANDRA-6742)