mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
Merge branch 'main' of github.com:nosqlbench/nosqlbench
This commit is contained in:
@@ -106,7 +106,7 @@ public enum RunState {
|
||||
case Stopping, Finished, Errored -> true;// A motor has exhausted its input, and is finished with its work
|
||||
default -> false;
|
||||
};
|
||||
case Stopping -> (target == Stopped||target==Finished); // A motor was stopped by request before exhausting input
|
||||
case Stopping -> (target == Stopped||target==Finished||target==Errored); // A motor was stopped by request before exhausting input
|
||||
case Finished -> (target == Running); // A motor was restarted?
|
||||
case Errored -> target==Errored;
|
||||
};
|
||||
|
||||
@@ -87,10 +87,10 @@ public class ActivityExecutor implements ActivityController, ParameterMap.Listen
|
||||
|
||||
activity.setRunState(RunState.Stopping);
|
||||
motors.forEach(Motor::requestStop);
|
||||
tally.awaitNoneOther(RunState.Stopped, RunState.Finished);
|
||||
tally.awaitNoneOther(RunState.Stopped, RunState.Finished, RunState.Errored);
|
||||
|
||||
shutdownExecutorService(Integer.MAX_VALUE);
|
||||
tally.awaitNoneOther(RunState.Stopped, RunState.Finished);
|
||||
tally.awaitNoneOther(RunState.Stopped, RunState.Finished, RunState.Errored);
|
||||
activity.setRunState(RunState.Stopped);
|
||||
|
||||
logger.info(() -> "stopped: " + this.getActivityDef().getAlias() + " with " + motors.size() + " slots");
|
||||
@@ -349,7 +349,7 @@ public class ActivityExecutor implements ActivityController, ParameterMap.Listen
|
||||
return activity;
|
||||
}
|
||||
|
||||
public void notifyException(Thread t, Throwable e) {
|
||||
public synchronized void notifyException(Thread t, Throwable e) {
|
||||
logger.debug(() -> "Uncaught exception in activity thread forwarded to activity executor: " + e.getMessage());
|
||||
this.exception = new RuntimeException("Error in activity thread " + t.getName(), e);
|
||||
this.requestStopMotors();
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<dependency>
|
||||
<groupId>org.snakeyaml</groupId>
|
||||
<artifactId>snakeyaml-engine</artifactId>
|
||||
<version>2.5</version>
|
||||
<version>2.6</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
Reference in New Issue
Block a user