lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject lucene-solr:jira/http2: Reverse back to stable point
Date Thu, 01 Nov 2018 09:20:29 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/jira/http2 9cabf4753 -> c9bcaddec


Reverse back to stable point


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

Branch: refs/heads/jira/http2
Commit: c9bcaddec14997bdb0bbf541b66c79303d59be77
Parents: 9cabf47
Author: Cao Manh Dat <datcm@apache.org>
Authored: Thu Nov 1 09:20:21 2018 +0000
Committer: Cao Manh Dat <datcm@apache.org>
Committed: Thu Nov 1 09:20:21 2018 +0000

----------------------------------------------------------------------
 .../src/java/org/apache/solr/update/UpdateShardHandler.java    | 6 +++---
 .../org/apache/solr/client/solrj/impl/Http2SolrClient.java     | 4 ++--
 .../java/org/apache/solr/client/solrj/impl/HttpClientUtil.java | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c9bcadde/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java b/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java
index ec500f7..4af1ae7 100644
--- a/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java
+++ b/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java
@@ -110,11 +110,11 @@ public class UpdateShardHandler implements SolrMetricProducer, SolrInfoBean
{
     if (cfg != null) {
       updateOnlyClientBuilder
           .connectionTimeout(cfg.getDistributedConnectionTimeout())
-          .idleTimeout(cfg.getDistributedSocketTimeout());
-//          .maxConnectionsPerHost(cfg.getMaxUpdateConnectionsPerHost());
+          .idleTimeout(cfg.getDistributedSocketTimeout())
+          .maxConnectionsPerHost(cfg.getMaxUpdateConnectionsPerHost());
     }
     updateOnlyClient = updateOnlyClientBuilder.build();
-//    updateOnlyClient.addListenerFactory(updateHttpListenerFactory);
+    updateOnlyClient.addListenerFactory(updateHttpListenerFactory);
 
     defaultClient = HttpClientUtil.createClient(clientParams, defaultConnectionManager, false,
httpRequestExecutor);
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c9bcadde/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java
index 8083d34..c49175c 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http2SolrClient.java
@@ -174,11 +174,13 @@ public class Http2SolrClient extends SolrClient {
       log.debug("Create Http2SolrClient with HTTP/1.1 transport");
       transport = new HttpClientTransportOverHTTP(2);
       httpClient = new HttpClient(transport, sslContextFactory);
+      if (builder.maxConnectionsPerHost != null) httpClient.setMaxConnectionsPerDestination(builder.maxConnectionsPerHost);
     } else {
       log.debug("Create Http2SolrClient with HTTP/2 transport");
       HTTP2Client http2client = new HTTP2Client();
       transport = new HttpClientTransportOverHTTP2(http2client);
       httpClient = new HttpClient(transport, sslContextFactory);
+      httpClient.setMaxConnectionsPerDestination(4);
     }
 
     httpClient.setExecutor(httpClientExecutor);
@@ -188,8 +190,6 @@ public class Http2SolrClient extends SolrClient {
     httpClient.setMaxRequestsQueuedPerDestination(asyncTracker.getMaxRequestsQueuedPerDestination());
     httpClient.setUserAgentField(new HttpField(HttpHeader.USER_AGENT, AGENT));
 
-//    if (builder.maxConnectionsPerHost != null) httpClient.setMaxConnectionsPerDestination(builder.maxConnectionsPerHost);
-    httpClient.setMaxConnectionsPerDestination(100000);
     if (builder.idleTimeout != null) httpClient.setIdleTimeout(builder.idleTimeout);
     if (builder.connectionTimeout != null) httpClient.setConnectTimeout(builder.connectionTimeout);
     return httpClient;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c9bcadde/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
index 3fd2fb7..c97ef94 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
@@ -77,7 +77,7 @@ public class HttpClientUtil {
   
   public static final int DEFAULT_CONNECT_TIMEOUT = 60000;
   public static final int DEFAULT_SO_TIMEOUT = 600000;
-  public static final int DEFAULT_MAXCONNECTIONSPERHOST = 5;
+  public static final int DEFAULT_MAXCONNECTIONSPERHOST = 100000;
   public static final int DEFAULT_MAXCONNECTIONS = 100000;
   
   private static final int VALIDATE_AFTER_INACTIVITY_DEFAULT = 3000;


Mime
View raw message