diff options
author | Harald Musum <musum@verizonmedia.com> | 2021-04-27 10:08:44 +0200 |
---|---|---|
committer | Harald Musum <musum@verizonmedia.com> | 2021-04-27 10:08:44 +0200 |
commit | 1474a930b38858bc814e14a11175b1787981bcfd (patch) | |
tree | b3a86a8ae5e4e4e5f16202335170f1f7086f6c0e /filedistribution/src | |
parent | 636e0b9c27c406e0b75a5c9e9d3da2af1d333b9d (diff) |
Change the way we switch connection when the current one is not working
Consider only healthy sources (if there are any) when switching to
a new one fue to failures.
Also log when connecting to a source
Diffstat (limited to 'filedistribution/src')
2 files changed, 2 insertions, 2 deletions
diff --git a/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownloader.java b/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownloader.java index 9f872ac7042..05fbd457a0d 100644 --- a/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownloader.java +++ b/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownloader.java @@ -127,7 +127,7 @@ public class FileReferenceDownloader { return true; } else { log.log(logLevel, "File reference '" + fileReference + "' not found at " + connection.getAddress()); - connectionPool.setNewCurrentConnection(); + connectionPool.switchConnection(); return false; } } else { diff --git a/filedistribution/src/test/java/com/yahoo/vespa/filedistribution/FileDownloaderTest.java b/filedistribution/src/test/java/com/yahoo/vespa/filedistribution/FileDownloaderTest.java index a68b6527aad..1344b7afbb3 100644 --- a/filedistribution/src/test/java/com/yahoo/vespa/filedistribution/FileDownloaderTest.java +++ b/filedistribution/src/test/java/com/yahoo/vespa/filedistribution/FileDownloaderTest.java @@ -341,7 +341,7 @@ public class FileDownloaderTest { } @Override - public Connection setNewCurrentConnection() { + public Connection switchConnection() { return this; } |