private boolean startDownloadRpc(FileReferenceDownload fileReferenceDownload, int retryCount, Connection connection, Duration timeout) {
        Request request = createRequest(fileReferenceDownload);
        connection.invokeSync(request, timeout);

        Level logLevel = (retryCount > 3 ? Level.INFO : Level.FINE);
        FileReference fileReference = fileReferenceDownload.fileReference();
        String address = connection.getAddress();
        if (validateResponse(request)) {
            log.log(Level.FINE, () -> "Request callback, OK. Req: " + request + "\nSpec: " + connection);
            int errorCode = request.returnValues().get(0).asInt32();

            if (errorCode == 0) {
                log.log(Level.FINE, () -> "Found " + fileReference + " available at " + address);
                return true;
            } else {
                var error = FileApiErrorCodes.get(errorCode);
                log.log(logLevel, "Downloading " + fileReference + " from " + address + " failed (" + error + ")");
                return false;
            }
        } else {
            log.log(logLevel, "Downloading " + fileReference + " from " + address +
                    " (client " + fileReferenceDownload.client() + ") failed:" +
                    " error code " + request.errorCode() + " (" + request.errorMessage() + ")." +
                    " (retry " + retryCount + ", rpc timeout " + timeout + ")");
            return false;
        }
    }
Downloads file reference from config server and keeps track of files being downloaded

@author hmusum
filedistribution/src/main/java/com/yahoo/vespa/filedistribution/FileReferenceDownloader.java