aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Musum <musum@yahooinc.com>2021-09-30 14:25:26 +0200
committerHarald Musum <musum@yahooinc.com>2021-09-30 14:25:26 +0200
commitb38b34584a16f791c29f9a72245f1253b8de1bbb (patch)
tree5a2a3bfece2048c9b3ba083f323ad900762ad608
parent0393d7fd226cecc0c15d26f83799451a5da0127c (diff)
Log pool name when switching connection
-rw-r--r--config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/FileDistributionAndUrlDownload.java2
-rw-r--r--config/src/main/java/com/yahoo/vespa/config/JRTConnectionPool.java6
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileDistributionUtil.java2
3 files changed, 5 insertions, 5 deletions
diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/FileDistributionAndUrlDownload.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/FileDistributionAndUrlDownload.java
index 1dba56805a5..d32a866cfbd 100644
--- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/FileDistributionAndUrlDownload.java
+++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/filedistribution/FileDistributionAndUrlDownload.java
@@ -28,7 +28,7 @@ public class FileDistributionAndUrlDownload {
public FileDistributionAndUrlDownload(Supervisor supervisor, ConfigSourceSet source) {
fileDistributionRpcServer =
new FileDistributionRpcServer(supervisor,
- new FileDownloader(new JRTConnectionPool(source, "filedistribution-jrt-pool-")));
+ new FileDownloader(new JRTConnectionPool(source, "filedistribution-jrt-pool")));
urlDownloadRpcServer = new UrlDownloadRpcServer(supervisor);
cleanupExecutor.scheduleAtFixedRate(new CachedFilesMaintainer(), delay.toSeconds(), delay.toSeconds(), TimeUnit.SECONDS);
}
diff --git a/config/src/main/java/com/yahoo/vespa/config/JRTConnectionPool.java b/config/src/main/java/com/yahoo/vespa/config/JRTConnectionPool.java
index b5147075972..78580328bf9 100644
--- a/config/src/main/java/com/yahoo/vespa/config/JRTConnectionPool.java
+++ b/config/src/main/java/com/yahoo/vespa/config/JRTConnectionPool.java
@@ -38,12 +38,12 @@ public class JRTConnectionPool implements ConnectionPool {
private volatile JRTConnection currentConnection;
public JRTConnectionPool(ConfigSourceSet sourceSet) {
- this(sourceSet, "config-jrt-pool-" + sourceSet.hashCode());
+ this(sourceSet, "config-jrt-pool" + sourceSet.hashCode());
}
public JRTConnectionPool(ConfigSourceSet sourceSet, String poolName) {
this.poolName = poolName;
- supervisor = new Supervisor(new Transport(poolName)).setDropEmptyBuffers(true);
+ supervisor = new Supervisor(new Transport(poolName + "-")).setDropEmptyBuffers(true);
addSources(sourceSet);
}
@@ -91,7 +91,7 @@ public class JRTConnectionPool implements ConnectionPool {
List<JRTConnection> sourceCandidates = getSources();
sourceCandidates.remove(currentConnection);
JRTConnection newConnection = pickNewConnectionRandomly(sourceCandidates);
- log.log(Level.INFO, () -> "Switching from " + currentConnection + " to " + newConnection);
+ log.log(Level.INFO, () -> poolName + ": Switching from " + currentConnection + " to " + newConnection);
return currentConnection = newConnection;
}
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileDistributionUtil.java b/configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileDistributionUtil.java
index cfe7349a1c6..1985fd534fb 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileDistributionUtil.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/filedistribution/FileDistributionUtil.java
@@ -50,7 +50,7 @@ public class FileDistributionUtil {
.collect(Collectors.toList());
return configServers.size() > 0
- ? new JRTConnectionPool(new ConfigSourceSet(configServers), "filedistribution-jrt-pool-")
+ ? new JRTConnectionPool(new ConfigSourceSet(configServers), "filedistribution-jrt-pool")
: emptyConnectionPool();
}