diff options
author | HÃ¥kon Hallingstad <hakon@verizonmedia.com> | 2021-04-28 11:45:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-28 11:45:47 +0200 |
commit | 4fbd27dddde4aff5de1be48f79057b6357bed123 (patch) | |
tree | bce7976dafe2bf8b975be203efa0c9f150d876bb /filedistribution | |
parent | 365b349bec41a2ce8e8b2918eb7a2554cf55f0b6 (diff) | |
parent | c80bef10e26ce13cf29c8873f629a29a13da5208 (diff) |
Merge pull request #17626 from vespa-engine/hmusum/switch-only-when-current-connection-is-failing
Switch connection only when the current one is failing [run-systemtest]
Diffstat (limited to 'filedistribution')
2 files changed, 3 insertions, 13 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 05fbd457a0d..da9d4ceab88 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.switchConnection(); + connectionPool.switchConnection(connection); 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 1344b7afbb3..61575b650ce 100644 --- a/filedistribution/src/test/java/com/yahoo/vespa/filedistribution/FileDownloaderTest.java +++ b/filedistribution/src/test/java/com/yahoo/vespa/filedistribution/FileDownloaderTest.java @@ -314,14 +314,6 @@ public class FileDownloaderTest { } @Override - public void setError(int errorCode) { - } - - @Override - public void setSuccess() { - } - - @Override public String getAddress() { return null; } @@ -331,9 +323,7 @@ public class FileDownloaderTest { } @Override - public void setError(Connection connection, int errorCode) { - connection.setError(errorCode); - } + public void setError(Connection connection, int errorCode) { } @Override public Connection getCurrent() { @@ -341,7 +331,7 @@ public class FileDownloaderTest { } @Override - public Connection switchConnection() { + public Connection switchConnection(Connection connection) { return this; } |