mirror of https://github.com/apache/cassandra
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:
parent
01f2855b47
commit
1619413e56
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue