diff options
Diffstat (limited to 'filedistribution')
-rw-r--r-- | filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownloader.java | 13 |
1 files changed, 8 insertions, 5 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 eda481b051d..cd07591c00c 100644 --- a/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownloader.java +++ b/filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownloader.java @@ -54,6 +54,7 @@ class FileReferenceDownloader { private final FileReceiver fileReceiver; FileReferenceDownloader(File downloadDirectory, ConnectionPool connectionPool, Duration timeout) { + log.log(LogLevel.DEBUG, "FileReferenceDownloader connection pool:\n" + connectionPool); this.connectionPool = connectionPool; this.downloadTimeout = timeout; readFromQueueExecutor.submit(this::readFromQueue); @@ -107,8 +108,7 @@ class FileReferenceDownloader { Thread.sleep(10); } catch (InterruptedException e) { /* ignore for now */} } else { - log.log(LogLevel.INFO, "Polling queue, found file reference '" + - fileReferenceDownload.fileReference().value() + "' to download"); + log.log(LogLevel.INFO, "Will download file reference '" + fileReferenceDownload.fileReference().value() + "'"); downloadExecutor.submit(() -> startDownload(fileReferenceDownload.fileReference(), downloadTimeout, fileReferenceDownload)); } } while (true); @@ -137,9 +137,12 @@ class FileReferenceDownloader { return false; } } else { - log.log(LogLevel.WARNING, "Request failed. Req: " + request + "\nSpec: " + connection.getAddress()); - if (request.isError() && request.errorCode() == ErrorCode.CONNECTION) - connection.setError(request.errorCode()); + log.log(LogLevel.WARNING, "Request failed. Req: " + request + "\nSpec: " + connection.getAddress() + + ", error code: " + request.errorCode()); + if (request.isError() && request.errorCode() == ErrorCode.CONNECTION || request.errorCode() == ErrorCode.TIMEOUT) { + log.log(LogLevel.WARNING, "Setting error for connection " + connection.getAddress()); + connectionPool.setError(connection, request.errorCode()); + } return false; } } |