summaryrefslogtreecommitdiffstats
path: root/configserver
diff options
context:
space:
mode:
authorHarald Musum <musum@yahooinc.com>2023-01-04 09:59:45 +0100
committerHarald Musum <musum@yahooinc.com>2023-01-04 09:59:45 +0100
commit509577a85d28604235dd6a6e1a8bf268829a5bce (patch)
tree2f9633b138af8022196a29454ee547d785b17898 /configserver
parent21a63553b099e37f480ea3b4b1a65862388e3655 (diff)
Terminate if unable to shutdown executor, wait a shorter time
Diffstat (limited to 'configserver')
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/ConfigServerBootstrap.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/ConfigServerBootstrap.java b/configserver/src/main/java/com/yahoo/vespa/config/server/ConfigServerBootstrap.java
index ccc9f615c93..b811fe21310 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/ConfigServerBootstrap.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/ConfigServerBootstrap.java
@@ -229,12 +229,15 @@ public class ConfigServerBootstrap extends AbstractComponent implements Runnable
List<ApplicationId> failedDeployments = checkDeployments(deployments);
executor.shutdown();
- executor.awaitTermination(365, TimeUnit.DAYS); // Timeout should never happen
+ if (! executor.awaitTermination(5, TimeUnit.HOURS)) {
+ log.log(Level.SEVERE, () -> "Unable to shutdown " + executor + ", waited 5 hours. Exiting");
+ System.exit(1);
+ }
return failedDeployments;
}
- private enum DeploymentStatus { inProgress, done, failed}
+ private enum DeploymentStatus { inProgress, done, failed }
private List<ApplicationId> checkDeployments(Map<ApplicationId, Future<?>> deployments) {
int applicationCount = deployments.size();