SOLR-12836: ZkController creates a cloud solr client with no connection or read timeouts.

This changes ZkController to use the http client created by the update shard handler instead of creating a custom one.
This commit is contained in:
Shalin Shekhar Mangar 2018-10-05 15:18:11 +05:30
parent 98b057c93a
commit eb47099ee2
2 changed files with 5 additions and 1 deletions

View File

@ -164,6 +164,9 @@ Bug Fixes
* SOLR-12814: Metrics history causing "HttpParser URI is too large >8192" when many collections (janhoy)
* SOLR-12836: ZkController creates a cloud solr client with no connection or read timeouts. Now the http client
created by the update shard handler is used instead. (shalin)
Improvements
----------------------
* SOLR-12767: Solr now always includes in the response of update requests the achieved replication factor

View File

@ -671,7 +671,8 @@ public class ZkController {
if (cloudManager != null) {
return cloudManager;
}
cloudSolrClient = new CloudSolrClient.Builder(Collections.singletonList(zkServerAddress), Optional.empty()).build();
cloudSolrClient = new CloudSolrClient.Builder(Collections.singletonList(zkServerAddress), Optional.empty())
.withHttpClient(cc.getUpdateShardHandler().getDefaultHttpClient()).build();
cloudManager = new SolrClientCloudManager(new ZkDistributedQueueFactory(zkClient), cloudSolrClient);
}
return cloudManager;