cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jji...@apache.org
Subject [04/15] cassandra git commit: CASSANDRA-13159: Coalescing strategy can enter infinite loop
Date Fri, 10 Feb 2017 23:32:08 GMT
CASSANDRA-13159: Coalescing strategy can enter infinite loop

Patch by Corentin Chary; Reviewed by Jeff Jirsa for CASSANDRA-13159


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

Branch: refs/heads/cassandra-3.0
Commit: f6a7057815e66ba75253510b3ef6bad492381d94
Parents: eb0f443
Author: Jeff Jirsa <jeff@jeffjirsa.net>
Authored: Fri Feb 10 15:24:18 2017 -0800
Committer: Jeff Jirsa <jeff@jeffjirsa.net>
Committed: Fri Feb 10 15:24:18 2017 -0800

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


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f6a70578/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 0c7d129..5c86687 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.1.17
+ * Coalescing strategy can enter infinite loop (CASSANDRA-13159)
  * Upgrade netty version to fix memory leak with client encryption (CASSANDRA-13114)
  * Fix paging for DISTINCT queries on partition keys and static columns (CASSANDRA-13017)
  * Fix race causing infinite loop if Thrift server is stopped before it starts listening
(CASSANDRA-12856)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f6a70578/src/java/org/apache/cassandra/utils/CoalescingStrategies.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/CoalescingStrategies.java b/src/java/org/apache/cassandra/utils/CoalescingStrategies.java
index ca1399b..6b69066 100644
--- a/src/java/org/apache/cassandra/utils/CoalescingStrategies.java
+++ b/src/java/org/apache/cassandra/utils/CoalescingStrategies.java
@@ -96,7 +96,7 @@ public class CoalescingStrategies
     {
         // only sleep if we can expect to double the number of messages we're sending in
the time interval
         long sleep = messages * averageGap;
-        if (sleep > maxCoalesceWindow)
+        if (sleep <= 0 || sleep > maxCoalesceWindow)
             return false;
 
         // assume we receive as many messages as we expect; apply the same logic to the future
batch:


Mime
View raw message