summaryrefslogtreecommitdiffstats
path: root/filedistribution
diff options
context:
space:
mode:
authorHarald Musum <musum@yahooinc.com>2021-10-06 20:55:54 +0200
committerHarald Musum <musum@yahooinc.com>2021-10-06 20:55:54 +0200
commit1ea7116333f2ef811ac1b927db9477012cc56cd9 (patch)
treee32006ed3e07a7b80c1476fe962710e2e1f55327 /filedistribution
parent717082dcd93b2c158ccb815d19dbd41ded1809c4 (diff)
setError() -> switchConnection() and remove setError()
Diffstat (limited to 'filedistribution')
-rw-r--r--filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownloader.java4
-rw-r--r--filedistribution/src/test/java/com/yahoo/vespa/filedistribution/FileDownloaderTest.java5
2 files changed, 3 insertions, 6 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 949b1b703cd..952684b7b0b 100644
--- a/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownloader.java
+++ b/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownloader.java
@@ -1,4 +1,4 @@
-// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.filedistribution;
import com.yahoo.concurrent.DaemonThreadFactory;
@@ -114,7 +114,7 @@ public class FileReferenceDownloader {
log.log(logLevel, () -> "Downloading file " + fileReference + " from " + connection.getAddress() + " failed: " +
request + ", error: " + request.errorMessage() + ", will use another config server for next request" +
" (retry count " + retryCount + ", rpc timeout " + rpcTimeout.getSeconds() + ")");
- connectionPool.setError(connection, request.errorCode());
+ connectionPool.switchConnection(connection);
return false;
}
}
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 6169f6fbe55..15cc28007ce 100644
--- a/filedistribution/src/test/java/com/yahoo/vespa/filedistribution/FileDownloaderTest.java
+++ b/filedistribution/src/test/java/com/yahoo/vespa/filedistribution/FileDownloaderTest.java
@@ -1,4 +1,4 @@
-// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.filedistribution;
import com.yahoo.config.FileReference;
@@ -325,9 +325,6 @@ public class FileDownloaderTest {
}
@Override
- public void setError(Connection connection, int errorCode) { }
-
- @Override
public Connection getCurrent() {
return this;
}