diff options
author | Harald Musum <musum@yahoo-inc.com> | 2016-08-08 14:52:56 +0200 |
---|---|---|
committer | Harald Musum <musum@yahoo-inc.com> | 2016-08-08 14:52:56 +0200 |
commit | af4cc18a50cb17b4355771876099fccebd99e756 (patch) | |
tree | 915c27f9301f427d88324300f762c5c915ba476c /config-proxy | |
parent | e287de7bc17024d764f38f0827e1c2808418df92 (diff) |
Log generation when sending response
* Some other small changes to logging
Diffstat (limited to 'config-proxy')
-rw-r--r-- | config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServer.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServer.java b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServer.java index 30cc68b340b..588c0f7a0b7 100644 --- a/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServer.java +++ b/config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ConfigProxyRpcServer.java @@ -110,7 +110,7 @@ public class ConfigProxyRpcServer implements Runnable, TargetWatcher, RpcServer */ @SuppressWarnings({"UnusedDeclaration"}) public final void getConfigV3(Request req) { - log.log(LogLevel.DEBUG, "getConfigV2"); + log.log(LogLevel.SPAM, "getConfigV3"); JRTServerConfigRequest request = JRTServerConfigRequestV3.createFromRequest(req); if (isProtocolVersionSupported(request)) { preHandle(req); @@ -155,14 +155,18 @@ public class ConfigProxyRpcServer implements Runnable, TargetWatcher, RpcServer } try { RawConfig config = proxyServer.resolveConfig(request); - if (ProxyServer.configOrGenerationHasChanged(config, request)) { + if (config == null) { + if (log.isLoggable(LogLevel.DEBUG)) { + log.log(LogLevel.DEBUG, "No config received yet for " + request.getShortDescription() + ",not sending response"); + } + } else if (ProxyServer.configOrGenerationHasChanged(config, request)) { if (log.isLoggable(LogLevel.DEBUG)) { log.log(LogLevel.DEBUG, "Should send response for " + request.getShortDescription() + ",config=" + config); } returnOkResponse(request, config); } else { if (log.isLoggable(LogLevel.DEBUG)) { - log.log(LogLevel.DEBUG, "Should not send response for " + request.getShortDescription() + ", config=" + config); + log.log(LogLevel.DEBUG, "No new config for " + request.getShortDescription() + ",not sending response"); } } } catch (Exception e) { @@ -320,7 +324,7 @@ public class ConfigProxyRpcServer implements Runnable, TargetWatcher, RpcServer request.addOkResponse(config.getPayload(), config.getGeneration(), config.getConfigMd5()); if (log.isLoggable(LogLevel.DEBUG)) { log.log(LogLevel.DEBUG, "Return response: " + request.getShortDescription() + ",configMd5=" + config.getConfigMd5() + - ",config=" + config.getPayload()); + ",config=" + config.getPayload() + ",generation=" + config.getGeneration()); } // TODO Catch exception for now, since the request might have been returned in CheckDelayedResponse |