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

patch by Eduard Tudenhoefner; reviewed by Stefania Alborghetti for CASSANDRA-12938
This commit is contained in:
Eduard Tudenhoefner 2017-08-21 11:36:08 +08:00 committed by Stefania Alborghetti
parent 01f2855b47
commit 1619413e56
2 changed files with 24 additions and 19 deletions

View File

@ -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)

View File

@ -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)
{
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();
}
// synchronize the start of all the consumer threads
start.countDown();
try
{
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();
}
releaseConsumers.await();