You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sl...@apache.org on 2012/04/26 16:35:09 UTC
[3/3] git commit: fix stress tool that hangs forever on timeout or
error patch by Pavel Yaskevich;
reviewed by Brandon Williams for CASSANDRA-4128
fix stress tool that hangs forever on timeout or error
patch by Pavel Yaskevich; reviewed by Brandon Williams for CASSANDRA-4128
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/cb67c98d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cb67c98d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cb67c98d
Branch: refs/heads/cassandra-1.1
Commit: cb67c98d574d941819a127bb60033fbbf34e511f
Parents: 8c9d0fb
Author: Pavel Yaskevich <xe...@apache.org>
Authored: Tue Apr 24 10:52:54 2012 -0700
Committer: Pavel Yaskevich <xe...@apache.org>
Committed: Tue Apr 24 10:52:54 2012 -0700
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../src/org/apache/cassandra/stress/Stress.java | 2 +-
.../org/apache/cassandra/stress/StressAction.java | 6 +++++-
3 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/cb67c98d/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 814fe99..544d393 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -8,6 +8,7 @@
* cqlsh: guess correct version of Python for Arch Linux (CASSANDRA-4090)
* (CLI) properly handle quotes in create/update keyspace commands (CASSANDRA-4129)
* Avoids possible deadlock during bootstrap (CASSANDRA-4159)
+ * fix stress tool that hangs forever on timeout or error (CASSANDRA-4128)
1.0.9
http://git-wip-us.apache.org/repos/asf/cassandra/blob/cb67c98d/tools/stress/src/org/apache/cassandra/stress/Stress.java
----------------------------------------------------------------------
diff --git a/tools/stress/src/org/apache/cassandra/stress/Stress.java b/tools/stress/src/org/apache/cassandra/stress/Stress.java
index 36f0410..c5e65f8 100644
--- a/tools/stress/src/org/apache/cassandra/stress/Stress.java
+++ b/tools/stress/src/org/apache/cassandra/stress/Stress.java
@@ -88,7 +88,7 @@ public final class Stress
}
else
{
- new StressAction(session, outStream).run();
+ new StressAction(session, outStream).start();
}
}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/cb67c98d/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 571d498..f0a9f49 100644
--- a/tools/stress/src/org/apache/cassandra/stress/StressAction.java
+++ b/tools/stress/src/org/apache/cassandra/stress/StressAction.java
@@ -137,6 +137,9 @@ public class StressAction extends Thread
}
}
+ if (producer.isAlive())
+ producer.interrupt(); // if producer is still alive it means that we had errors in the consumers
+
// marking an end of the output to the client
output.println("END");
}
@@ -161,7 +164,8 @@ public class StressAction extends Thread
}
catch (InterruptedException e)
{
- System.err.println("Producer error - " + e.getMessage());
+ if (e.getMessage() != null)
+ System.err.println("Producer error - " + e.getMessage());
return;
}
}