cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jzhu...@apache.org
Subject [1/2] cassandra git commit: Fix cassandra-stress hang with default options
Date Fri, 07 Dec 2018 02:26:51 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.11 8961246db -> 6a449b88d


Fix cassandra-stress hang with default options

patch by Jay Zhuang; reviewed by Stefania Alborghetti for CASSANDRA-14616


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

Branch: refs/heads/cassandra-3.11
Commit: bbf7dac87cdc41bf8e138a99f630e7a827ad0d98
Parents: 1104361
Author: Jay Zhuang <jay.zhuang@yahoo.com>
Authored: Wed Nov 14 11:43:58 2018 -0800
Committer: Jay Zhuang <jay.zhuang@yahoo.com>
Committed: Thu Dec 6 16:34:55 2018 -0800

----------------------------------------------------------------------
 CHANGES.txt                                                    | 1 +
 tools/stress/src/org/apache/cassandra/stress/StressAction.java | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/bbf7dac8/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 4520989..f9b59df 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.18
+ * Fix cassandra-stress write hang with default options (CASSANDRA-14616)
  * Differentiate between slices and RTs when decoding legacy bounds (CASSANDRA-14919)
  * CommitLogReplayer.handleReplayError should print stack traces (CASSANDRA-14589)
  * Netty epoll IOExceptions caused by unclean client disconnects being logged at INFO (CASSANDRA-14909)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/bbf7dac8/tools/stress/src/org/apache/cassandra/stress/StressAction.java
----------------------------------------------------------------------
diff --git a/tools/stress/src/org/apache/cassandra/stress/StressAction.java b/tools/stress/src/org/apache/cassandra/stress/StressAction.java
index 8b15e92..657117c 100644
--- a/tools/stress/src/org/apache/cassandra/stress/StressAction.java
+++ b/tools/stress/src/org/apache/cassandra/stress/StressAction.java
@@ -94,7 +94,11 @@ public class StressAction implements Runnable
     {
         PrintStream warmupOutput = new PrintStream(new OutputStream() { @Override public
void write(int b) throws IOException { } } );
         // do 25% of iterations as warmup but no more than 50k (by default hotspot compiles
methods after 10k invocations)
-        int iterations = Math.min(50000, (int) (settings.command.count * 0.25)) * settings.node.nodes.size();
+        int iterations = (settings.command.count >= 0
+                          ? Math.min(50000, (int)(settings.command.count * 0.25))
+                          : 50000) * settings.node.nodes.size();
+        if (iterations <= 0) return;
+
         int threads = 100;
 
         if (settings.rate.maxThreads > 0)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message