Skip to content

Commit

Permalink
Merge pull request #33121 from vespa-engine/hmusum/file-distribution-…
Browse files Browse the repository at this point in the history
…logging-changes

Minor changes to logging in file distribution
  • Loading branch information
hmusum authored Jan 15, 2025
2 parents ae7f89d + 1bc49aa commit 39b9122
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,15 @@ public void serveFile(FileReference fileReference,
Set<CompressionType> acceptedCompressionTypes,
Request request,
Receiver receiver) {
log.log(Level.FINE, () -> "Received request for file reference '" + fileReference + "' from " + request.target());
log.log(Level.FINE, () -> "Received request for file reference '" + fileReference + "' from " + request.target() +
", download from other source: " + downloadFromOtherSourceIfNotFound);
String client = request.target().toString();
executor.execute(() -> {
var result = serveFileInternal(fileReference, downloadFromOtherSourceIfNotFound, client, receiver, acceptedCompressionTypes);
request.returnValues()
.add(new Int32Value(result.code()))
.add(new StringValue(result.description()));
log.log(Level.FINE, () -> "Returning request for file reference '" + fileReference + "' from " + request.target());
request.returnRequest();
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ void startDownloadFromSource(FileReferenceDownload fileReferenceDownload, Spec s
FileReference fileReference = fileReferenceDownload.fileReference();
if (downloads.get(fileReference).isPresent()) return;

log.log(Level.FINE, () -> "Will download " + fileReference + " with timeout " + downloadTimeout);
for (var connection : connectionPool.connections()) {
if (connection.getAddress().equals(spec.toString()))
downloadExecutor.submit(() -> {
Expand Down

0 comments on commit 39b9122

Please sign in to comment.