VishnuPriyaChandraSekar commented on code in PR #4626:
URL: https://github.com/apache/solr/pull/4626#discussion_r3686945306
##########
solr/solrj-jetty/src/java/org/apache/solr/client/solrj/jetty/HttpJettySolrClient.java:
##########
@@ -301,7 +301,7 @@ private HttpClient createHttpClient(Builder builder) {
asyncTracker.getMaxRequestsQueuedPerDestination());
httpClient.setUserAgentField(new HttpField(HttpHeader.USER_AGENT,
USER_AGENT));
httpClient.setConnectTimeout(builder.getConnectionTimeoutMillis());
- httpClient.setIdleTimeout(-1); // don't enforce an idle timeout at this
level
+ httpClient.setIdleTimeout(SolrHttpConstants.DEFAULT_SO_TIMEOUT);
Review Comment:
Your concern is valid for HTTP1.1 (hoping that it doesn't break)
For HTTP2, the httpClient.idleTimeout is applied while the client waits for
server acknowledge the preface & settings and request.idleTimeout is applied
once the request is written into the streams (This behavior is clearly evident
in the
[HttpSenderOverHTTP2.java#201](https://github.com/jetty/jetty.project/blob/b564d6a4a040f0fce9b8db5179e8e3a556a30f6c/jetty-core/jetty-http2/jetty-http2-client-transport/src/main/java/org/eclipse/jetty/http2/client/transport/internal/HttpSenderOverHTTP2.java#L201))
```
@Override
public void succeeded(Stream stream)
{
long idleTimeout = request.getIdleTimeout();
if (idleTimeout >= 0)
stream.setIdleTimeout(idleTimeout);
callback.succeeded();
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]