diff options
author | Harald Musum <musum@yahooinc.com> | 2022-01-12 15:07:22 +0100 |
---|---|---|
committer | Harald Musum <musum@yahooinc.com> | 2022-01-12 15:07:22 +0100 |
commit | 93f2af5e853472d0deaabd20490f393df19cb6a2 (patch) | |
tree | 580e674d122031e29d7c8977ad2d05317bf6a8d5 /filedistribution/src/main/java/com/yahoo/vespa | |
parent | 6fd8eb7f4eeae6bb50e2f7c249bbe10ad40b72dc (diff) |
Use lower timeout
If we get a request for a file reference we don't have, try to download
with 10 second timeout and reply with not found otherwise, otherwise
a thread might be busy for a long time and we might end up with all
threads being busy and no requests can be served
Diffstat (limited to 'filedistribution/src/main/java/com/yahoo/vespa')
-rw-r--r-- | filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileDownloader.java | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileDownloader.java b/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileDownloader.java index 1821c8971e7..5941ed536a8 100644 --- a/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileDownloader.java +++ b/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileDownloader.java @@ -27,7 +27,6 @@ import java.util.logging.Logger; public class FileDownloader implements AutoCloseable { private static final Logger log = Logger.getLogger(FileDownloader.class.getName()); - private static final Duration defaultTimeout = Duration.ofMinutes(3); private static final Duration defaultSleepBetweenRetries = Duration.ofSeconds(5); public static final File defaultDownloadDirectory = new File(Defaults.getDefaults().underVespaHome("var/db/vespa/filedistribution")); @@ -38,10 +37,6 @@ public class FileDownloader implements AutoCloseable { private final FileReferenceDownloader fileReferenceDownloader; private final Downloads downloads = new Downloads(); - public FileDownloader(ConnectionPool connectionPool, Supervisor supervisor) { - this(connectionPool, supervisor, defaultDownloadDirectory, defaultTimeout, defaultSleepBetweenRetries); - } - public FileDownloader(ConnectionPool connectionPool, Supervisor supervisor, Duration timeout) { this(connectionPool, supervisor, defaultDownloadDirectory, timeout, defaultSleepBetweenRetries); } |