partial fixes for nosqlbench-797 Race condition between exceptional activity shutdown and normal scenario shutdown.

This commit is contained in:
Jonathan Shook
2022-11-30 11:17:10 -06:00
parent 79a2d09779
commit 86c4dfd966
25 changed files with 1184 additions and 353 deletions

View File

@@ -418,7 +418,7 @@ public class NBCLI implements Function<String[], Integer> {
// intentionally not shown for warn-only
logger.info("console logging level is " + options.getConsoleLogLevel());
ScenariosExecutor executor = new ScenariosExecutor("executor-" + sessionName, 1);
ScenariosExecutor scenariosExecutor = new ScenariosExecutor("executor-" + sessionName, 1);
if (options.getConsoleLogLevel().isGreaterOrEqualTo(NBLogLevel.WARN)) {
options.setWantsStackTraces(true);
logger.debug("enabling stack traces since log level is " + options.getConsoleLogLevel());
@@ -466,7 +466,7 @@ public class NBCLI implements Function<String[], Integer> {
scriptParams.putAll(buffer.getCombinedParams());
scenario.addScenarioScriptParams(scriptParams);
executor.execute(scenario);
scenariosExecutor.execute(scenario);
// while (true) {
// Optional<ScenarioResult> pendingResult = executor.getPendingResult(scenario.getScenarioName());
@@ -476,7 +476,7 @@ public class NBCLI implements Function<String[], Integer> {
// LockSupport.parkNanos(100000000L);
// }
ScenariosResults scenariosResults = executor.awaitAllResults();
ScenariosResults scenariosResults = scenariosExecutor.awaitAllResults();
logger.debug("Total of " + scenariosResults.getSize() + " result object returned from ScenariosExecutor");
ActivityMetrics.closeMetrics(options.wantsEnableChart());