From f076febad0081f0d05675420507672ed21930feb Mon Sep 17 00:00:00 2001 From: Harald Musum Date: Thu, 12 Dec 2024 15:11:43 +0100 Subject: [PATCH] Reduce FileDownloader timeout in maintainer We don't know which config server has the file, so it's better to have lower timeout and retry another server (also since downloader does retries within timeout, might need to look into that). --- .../server/maintenance/ApplicationPackageMaintainer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/ApplicationPackageMaintainer.java b/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/ApplicationPackageMaintainer.java index 636675980630..890a17e4b4e0 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/ApplicationPackageMaintainer.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/ApplicationPackageMaintainer.java @@ -43,6 +43,7 @@ public class ApplicationPackageMaintainer extends ConfigServerMaintainer { private static final Logger log = Logger.getLogger(ApplicationPackageMaintainer.class.getName()); + private static final Duration fileDownloaderTimeout = Duration.ofSeconds(30); private final File downloadDirectory; private final Supervisor supervisor = new Supervisor(new Transport("filedistribution-pool")).setDropEmptyBuffers(true); @@ -126,7 +127,7 @@ private static FileDownloader createFileDownloader(ApplicationRepository applica List otherConfigServersInCluster = getOtherConfigServersInCluster(applicationRepository.configserverConfig()); ConfigSourceSet configSourceSet = new ConfigSourceSet(otherConfigServersInCluster); ConnectionPool connectionPool = new FileDistributionConnectionPool(configSourceSet, supervisor); - return new FileDownloader(connectionPool, supervisor, downloadDirectory, Duration.ofSeconds(60)); + return new FileDownloader(connectionPool, supervisor, downloadDirectory, fileDownloaderTimeout); } @Override