summaryrefslogtreecommitdiffstats
path: root/container-core
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-02-11 12:00:59 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-02-11 12:00:59 +0000
commitf2a9d18477e9ed79dff64bfc141d5ad9f176601d (patch)
tree0d7d17ce60deb9136c715155f0461c7bd7c371fc /container-core
parent959503685d9a5fb15e6e63d494c02f65b4081b56 (diff)
If debugging of SearchHandler is turned on, the 1k first request will have trace and timing information.
The 1k number is configurable in the container-http config.
Diffstat (limited to 'container-core')
-rw-r--r--container-core/src/main/java/com/yahoo/container/jdisc/ThreadedHttpRequestHandler.java4
-rw-r--r--container-core/src/main/resources/configdefinitions/container-http.def3
2 files changed, 5 insertions, 2 deletions
diff --git a/container-core/src/main/java/com/yahoo/container/jdisc/ThreadedHttpRequestHandler.java b/container-core/src/main/java/com/yahoo/container/jdisc/ThreadedHttpRequestHandler.java
index dddde1205ca..a9ea737c96c 100644
--- a/container-core/src/main/java/com/yahoo/container/jdisc/ThreadedHttpRequestHandler.java
+++ b/container-core/src/main/java/com/yahoo/container/jdisc/ThreadedHttpRequestHandler.java
@@ -93,7 +93,7 @@ public abstract class ThreadedHttpRequestHandler extends ThreadedRequestHandler
/** Render and return whether the channel was closed */
private void render(HttpRequest request, HttpResponse httpResponse,
- LazyContentChannel channel, long startTime) throws IOException {
+ LazyContentChannel channel, long startTime) {
LoggingCompletionHandler logOnCompletion = null;
ContentChannelOutputStream output = null;
try {
@@ -168,7 +168,7 @@ public abstract class ThreadedHttpRequestHandler extends ThreadedRequestHandler
@Override
public void close(CompletionHandler completionHandler) {
if ( closed ) return;
- try { httpRequest.getData().close(); } catch (IOException e) {};
+ try { httpRequest.getData().close(); } catch (IOException e) {}
if (channel == null)
channel = handleResponse();
try {
diff --git a/container-core/src/main/resources/configdefinitions/container-http.def b/container-core/src/main/resources/configdefinitions/container-http.def
index ccf559b862a..23edd402893 100644
--- a/container-core/src/main/resources/configdefinitions/container-http.def
+++ b/container-core/src/main/resources/configdefinitions/container-http.def
@@ -3,3 +3,6 @@ namespace=container.core
## If non-empty, handlers should emit a header containing this string as key and the local host name as value
hostResponseHeaderKey string default=""
+
+## For debugging, number of requests to add trace and timing information too if debugging is enabled.
+numQueriesToTraceOnDebugAfterConstruction int default=1000