Skip to content

Commit

Permalink
Shutdown heartbeating last to prevent execution classified as dead wh…
Browse files Browse the repository at this point in the history
…en stopping the execution is slow (since heartbeating already have stopped). (#368)
  • Loading branch information
kagkarlsson committed Apr 13, 2023
1 parent 7191a9b commit 5b6166a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,12 @@ void stop(Duration utilExecutorsWaitBeforeInterrupt, Duration utilExecutorsWaitA
}
}

executor.stop(shutdownMaxWait);

// Shutdown heartbeating thread last
if (!ExecutorUtils.shutdownAndAwaitTermination(housekeeperExecutor, utilExecutorsWaitBeforeInterrupt, utilExecutorsWaitAfterInterrupt)) {
LOG.warn("Failed to shutdown housekeeper-executor properly.");
}

executor.stop(shutdownMaxWait);
}

public void pause() {
Expand Down

0 comments on commit 5b6166a

Please sign in to comment.