mirror of https://github.com/apache/cassandra
fix terminination of the stress.java when errors were encountered
patch by Pavel Yaskevich; reviewed by Brandon Williams for CASSANDRA-4128
This commit is contained in:
parent
8df0cea779
commit
25da034fb3
|
|
@ -9,6 +9,8 @@
|
|||
(CASSANDRA-4088)
|
||||
* relax path length requirement for sstable files when upgrading on
|
||||
non-Windows platforms (CASSANDRA-4110)
|
||||
* fix terminination of the stress.java when errors were encountered
|
||||
(CASSANDRA-4128)
|
||||
|
||||
|
||||
1.1-beta2
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ public final class Stress
|
|||
}
|
||||
else
|
||||
{
|
||||
new StressAction(session, outStream).run();
|
||||
new StressAction(session, outStream).start();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue