You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2018/10/05 09:49:40 UTC

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

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x ab50275ba -> 9252f625f


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.

(cherry picked from commit eb47099ee22669926e6fdd4fc39cce7d043e3e97)


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/9252f625
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/9252f625
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/9252f625

Branch: refs/heads/branch_7x
Commit: 9252f625fbbfc1a01f1bb4a33b96fd3f351794f8
Parents: ab50275
Author: Shalin Shekhar Mangar <sh...@apache.org>
Authored: Fri Oct 5 15:18:11 2018 +0530
Committer: Shalin Shekhar Mangar <sh...@apache.org>
Committed: Fri Oct 5 15:19:00 2018 +0530

----------------------------------------------------------------------
 solr/CHANGES.txt                                           | 3 +++
 solr/core/src/java/org/apache/solr/cloud/ZkController.java | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9252f625/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 77a6e80..b63152f 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -91,6 +91,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

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9252f625/solr/core/src/java/org/apache/solr/cloud/ZkController.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/ZkController.java b/solr/core/src/java/org/apache/solr/cloud/ZkController.java
index 8318277..d5de5dd 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ZkController.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ZkController.java
@@ -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;