aboutsummaryrefslogtreecommitdiffstats
path: root/filedistribution
diff options
context:
space:
mode:
authorHarald Musum <musum@yahooinc.com>2022-01-12 15:07:22 +0100
committerHarald Musum <musum@yahooinc.com>2022-01-12 15:07:22 +0100
commit93f2af5e853472d0deaabd20490f393df19cb6a2 (patch)
tree580e674d122031e29d7c8977ad2d05317bf6a8d5 /filedistribution
parent6fd8eb7f4eeae6bb50e2f7c249bbe10ad40b72dc (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')
-rw-r--r--filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileDownloader.java5
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);
}