diff options
author | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2021-11-12 13:09:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-12 13:09:11 +0100 |
commit | e8202e9ab83df0453f67ab2d7bdaddd8dfaf5064 (patch) | |
tree | b1b72b397c1eb5841421511c35ca123b67c7d905 | |
parent | 3a00db046ba69b840b2f62bdd973a33099ba0ebe (diff) | |
parent | 9394962c87cbce78d3e712792833aea3eccaa5a0 (diff) |
Merge pull request #19992 from vespa-engine/hmusum/add-debug-logging-in-nextConfig
Add some debug logging in ConfigSubscriber
-rw-r--r-- | config/src/main/java/com/yahoo/config/subscription/ConfigSubscriber.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/config/src/main/java/com/yahoo/config/subscription/ConfigSubscriber.java b/config/src/main/java/com/yahoo/config/subscription/ConfigSubscriber.java index f5ed79a1d44..07132c460f9 100644 --- a/config/src/main/java/com/yahoo/config/subscription/ConfigSubscriber.java +++ b/config/src/main/java/com/yahoo/config/subscription/ConfigSubscriber.java @@ -14,6 +14,7 @@ import java.util.List; import java.util.Map; import java.util.concurrent.CopyOnWriteArrayList; +import java.util.logging.Level; import java.util.logging.Logger; import static java.util.logging.Level.FINE; @@ -293,10 +294,13 @@ public class ConfigSubscriber implements AutoCloseable { // Keep on polling the subscriptions until we have a new generation across the board, or it times out for (ConfigHandle<? extends ConfigInstance> h : subscriptionHandles) { ConfigSubscription<? extends ConfigInstance> subscription = h.subscription(); + log.log(Level.FINEST, () -> "Calling nextConfig for " + subscription.getKey()); if ( ! subscription.nextConfig(timeLeftMillis)) { // This subscriber has no new state and we know it has exhausted all time + log.log(Level.FINEST, () -> "No new config for " + subscription.getKey()); return false; } + log.log(Level.FINEST, () -> "Got new generation or config for " + subscription.getKey()); throwIfExceptionSet(subscription); ConfigSubscription.ConfigState<? extends ConfigInstance> config = subscription.getConfigState(); if (currentGen == null) currentGen = config.getGeneration(); @@ -322,6 +326,7 @@ public class ConfigSubscriber implements AutoCloseable { if (reconfigDue) { // This indicates the clients will possibly reconfigure their services, so "reset" changed-logic in subscriptions. // Also if appropriate update the changed flag on the handler, which clients use. + log.log(Level.FINE, () -> "Reconfig will happen for generation " + generation); markSubsChangedSeen(currentGen); synchronized (monitor) { generation = currentGen; |