Skip to content

Commit

Permalink
0005235: Restarting engine from failed engine dialog not working
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Mar 3, 2022
1 parent 7072a8b commit 9185634
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,22 @@ public void start() {
public synchronized void restart(String engineName) {
FailedEngineInfo info = enginesFailed.get(engineName);
if (info != null) {
ISymmetricEngine engine = engines.get(engineName);
if (engine != null) {
try {
engine.destroy();
} catch (Exception e) {
log.warn("Destroy of engine failed", e);
}
engines.remove(engineName);
}
enginesFailed.remove(engineName);
if (restartExecutor == null) {
int poolSize = Integer.parseInt(System.getProperty(SystemConstants.SYSPROP_CONCURRENT_ENGINES_STARTING_COUNT, "5"));
restartExecutor = Executors.newFixedThreadPool(poolSize, new CustomizableThreadFactory("symmetric-engine-restart"));
}
SymmetricEngineStarter starter = new SymmetricEngineStarter(info.getPropertyFileName(), this);
enginesStarting.add(starter);
restartExecutor.execute(starter);
}
}
Expand Down

0 comments on commit 9185634

Please sign in to comment.