cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stefa...@apache.org
Subject [1/3] cassandra git commit: Fix cassandra-stress hang issues when an error during cluster connection happens
Date Mon, 21 Aug 2017 08:38:18 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.11 01f2855b4 -> 1619413e5
  refs/heads/trunk b740efa73 -> 6e42dd215


Fix cassandra-stress hang issues when an error during cluster connection happens

patch by Eduard Tudenhoefner; reviewed by Stefania Alborghetti for CASSANDRA-12938


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

Branch: refs/heads/cassandra-3.11
Commit: 1619413e5602b93641af1ccf5adbee80eaa2b53c
Parents: 01f2855
Author: Eduard Tudenhoefner <eduard.tudenhoefner@datastax.com>
Authored: Mon Aug 21 11:36:08 2017 +0800
Committer: Stefania Alborghetti <stefania.alborghetti@datastax.com>
Committed: Mon Aug 21 11:36:25 2017 +0800

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../apache/cassandra/stress/StressAction.java   | 40 +++++++++++---------
 2 files changed, 23 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/1619413e/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 4ede932..48c21cc 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.11.1
+ * Fix cassandra-stress hang issues when an error during cluster connection happens (CASSANDRA-12938)
  * Better bootstrap failure message when blocked by (potential) range movement (CASSANDRA-13744)
  * "ignore" option is ignored in sstableloader (CASSANDRA-13721)
  * Deadlock in AbstractCommitLogSegmentManager (CASSANDRA-13652)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/1619413e/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 30f8899..5a340e8 100644
--- a/tools/stress/src/org/apache/cassandra/stress/StressAction.java
+++ b/tools/stress/src/org/apache/cassandra/stress/StressAction.java
@@ -420,27 +420,31 @@ public class StressAction implements Runnable
                 SimpleClient sclient = null;
                 ThriftClient tclient = null;
                 JavaDriverClient jclient = null;
-
-
                 final ConnectionAPI clientType = settings.mode.api;
-                switch (clientType)
+
+                try
                 {
-                    case JAVA_DRIVER_NATIVE:
-                        jclient = settings.getJavaDriverClient();
-                        break;
-                    case SIMPLE_NATIVE:
-                        sclient = settings.getSimpleNativeClient();
-                        break;
-                    case THRIFT:
-                    case THRIFT_SMART:
-                        tclient = settings.getThriftClient();
-                        break;
-                    default:
-                        throw new IllegalStateException();
+                    switch (clientType)
+                    {
+                        case JAVA_DRIVER_NATIVE:
+                            jclient = settings.getJavaDriverClient();
+                            break;
+                        case SIMPLE_NATIVE:
+                            sclient = settings.getSimpleNativeClient();
+                            break;
+                        case THRIFT:
+                        case THRIFT_SMART:
+                            tclient = settings.getThriftClient();
+                            break;
+                        default:
+                            throw new IllegalStateException();
+                    }
+                }
+                finally
+                {
+                    // synchronize the start of all the consumer threads
+                    start.countDown();
                 }
-
-                // synchronize the start of all the consumer threads
-                start.countDown();
 
                 releaseConsumers.await();
 


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


Mime
View raw message