diff options
author | Arne Juul <arnej@yahoo-inc.com> | 2019-03-05 12:15:22 +0000 |
---|---|---|
committer | Arne Juul <arnej@yahoo-inc.com> | 2019-03-05 12:15:22 +0000 |
commit | ec90df1e191bfda0fa3ed8b35559a1286a45116c (patch) | |
tree | 33fd3a14cefa2598e3a7a15e09b757889291edb5 /config-model/src/main/java/com/yahoo | |
parent | ac24414fe5a6887343d85c94a9faed52052fc4d4 (diff) |
more info in log message
Diffstat (limited to 'config-model/src/main/java/com/yahoo')
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/HostPorts.java | 2 | ||||
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/PortFinder.java | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/HostPorts.java b/config-model/src/main/java/com/yahoo/vespa/model/HostPorts.java index be6568d2c20..225d0bbcb11 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/HostPorts.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/HostPorts.java @@ -130,7 +130,7 @@ public class HostPorts { String servType = service.getServiceType(); String configId = service.getConfigId(); int fallback = nextAvailableNetworkPort(); - int port = portFinder.findPort(new NetworkPorts.Allocation(fallback, servType, configId, suffix)); + int port = portFinder.findPort(new NetworkPorts.Allocation(fallback, servType, configId, suffix), hostname); reservePort(service, port, suffix); portFinder.use(new NetworkPorts.Allocation(port, servType, configId, suffix)); return port; diff --git a/config-model/src/main/java/com/yahoo/vespa/model/PortFinder.java b/config-model/src/main/java/com/yahoo/vespa/model/PortFinder.java index 5604dfa19b0..2d58eab80b5 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/PortFinder.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/PortFinder.java @@ -37,11 +37,13 @@ public class PortFinder { byKeys.put(key, allocation); } - public int findPort(Allocation request) { + public int findPort(Allocation request, String host) { String key = request.key(); if (byKeys.containsKey(key)) { int port = byKeys.get(key).port; - log.log(Level.INFO, "Re-using port "+port+" for allocation "+request); + if (port != request.port) { + log.log(Level.INFO, "Re-using port "+port+" for allocation "+request+" on "+host); + } return port; } int port = request.port; |