Description
In ConcurrentUpdateSolrClient we create an HttpPost Request which allows you to set a request config. If the request config is not provided httpclient will use the default request config.
org.apache.http.client.config.RequestConfig.Builder requestConfigBuilder = HttpClientUtil.createDefaultRequestConfigBuilder(); if (soTimeout != null) { requestConfigBuilder.setSocketTimeout(soTimeout); } if (connectionTimeout != null) { requestConfigBuilder.setConnectTimeout(connectionTimeout); } method.setConfig(requestConfigBuilder.build());
While creating the httpclient object we ensure that the default request is set with the properties we care about. This happens in HttpClientUtils#setupBuilder
RequestConfig requestConfig = requestConfigBuilder.build(); HttpClientBuilder retBuilder = builder.setDefaultRequestConfig(requestConfig);
So there is no need to set a per request config
Here is where the httpclient picks the request config is provided on the request itself : https://github.com/apache/httpcomponents-client/blob/4.5.3/httpclient/src/main/java/org/apache/http/impl/client/InternalHttpClient.java#L168
And if it's not provided it uses the default here : https://github.com/apache/httpcomponents-client/blob/4.5.3/httpclient/src/main/java/org/apache/http/impl/client/InternalHttpClient.java#L148
Attachments
Attachments
Issue Links
- is related to
-
SOLR-12550 ConcurrentUpdateSolrClient doesn't respect timeouts for commits and optimize
- Closed