cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject [1/2] git commit: Make sure compaction throughput values doesn't overflow because of int math patch by pvai reviewed by dbrosius for cassandra-6647
Date Wed, 05 Feb 2014 01:17:35 GMT
Updated Branches:
  refs/heads/cassandra-2.0 93bd89fbb -> 79b362616


Make sure compaction throughput values doesn't overflow because of int math
patch by pvai reviewed by dbrosius for cassandra-6647


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

Branch: refs/heads/cassandra-2.0
Commit: 511787d75d19e778123bc0c1384c3fd80f1bf32e
Parents: ed5cac1
Author: Dave Brosius <dbrosius@mebigfatguy.com>
Authored: Tue Feb 4 20:05:22 2014 -0500
Committer: Dave Brosius <dbrosius@mebigfatguy.com>
Committed: Tue Feb 4 20:05:22 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                                        | 1 +
 src/java/org/apache/cassandra/db/compaction/CompactionManager.java | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/511787d7/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b2e892e..75c7104 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,6 @@
 1.2.15
  * Move handling of migration event source to solve bootstrap race (CASSANDRA-6648)
+ * Make sure compaction throughput value doesn't overflow with int math (CASSANDRA-6647)
 
 1.2.14
  * Reverted code to limit CQL prepared statement cache by size (CASSANDRA-6592)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/511787d7/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
index d26a072..471fd82 100644
--- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
+++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
@@ -127,7 +127,7 @@ public class CompactionManager implements CompactionManagerMBean
      */
     public RateLimiter getRateLimiter()
     {
-        double currentThroughput = DatabaseDescriptor.getCompactionThroughputMbPerSec() *
1024 * 1024;
+        double currentThroughput = DatabaseDescriptor.getCompactionThroughputMbPerSec() *
1024.0 * 1024.0;
         // if throughput is set to 0, throttling is disabled
         if (currentThroughput == 0 || StorageService.instance.isBootstrapMode())
             currentThroughput = Double.MAX_VALUE;


Mime
View raw message