You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2020/08/12 10:57:37 UTC

[lucene-solr] branch reference_impl_dev updated: @523 Http2 client thread limits? I'm sorry buddy.

This is an automated email from the ASF dual-hosted git repository.

markrmiller pushed a commit to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/reference_impl_dev by this push:
     new 6cf33ac  @523 Http2 client thread limits? I'm sorry buddy.
6cf33ac is described below

commit 6cf33acce6ef8e95933d357fd7efabfe30f30bfa
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Wed Aug 12 05:57:06 2020 -0500

    @523 Http2 client thread limits? I'm sorry buddy.
---
 .../org/apache/solr/client/solrj/impl/Http2SolrClient.java     |  2 +-
 .../java/org/apache/solr/common/util/SolrQueuedThreadPool.java | 10 +++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

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 78cdb48..746394b 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
@@ -224,7 +224,7 @@ public class Http2SolrClient extends SolrClient {
       httpClient = new HttpClient(transport, sslContextFactory);
       if (builder.maxConnectionsPerHost != null) httpClient.setMaxConnectionsPerDestination(builder.maxConnectionsPerHost);
     }
-    httpClientExecutor = new SolrQueuedThreadPool("httpClient");
+    httpClientExecutor = new SolrQueuedThreadPool("httpClient", ParWork.PROC_COUNT, 3, idleTimeout);
 
     httpClient.setIdleTimeout(idleTimeout);
     try {
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/SolrQueuedThreadPool.java b/solr/solrj/src/java/org/apache/solr/common/util/SolrQueuedThreadPool.java
index d78e5f7..141829e5 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/SolrQueuedThreadPool.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/SolrQueuedThreadPool.java
@@ -90,12 +90,20 @@ public class SolrQueuedThreadPool extends ContainerLifeCycle implements ThreadFa
 
     public SolrQueuedThreadPool(String name) {
         this(10000, 15,
-                15000, -1,
+                30000, -1,
                 null, null,
                 new  SolrNamedThreadFactory(name));
         this.name = name;
     }
 
+    public SolrQueuedThreadPool(String name, int maxThreads, int minThreads, int idleTimeout) {
+        this(maxThreads, minThreads,
+            idleTimeout, -1,
+            null, null,
+            new  SolrNamedThreadFactory(name));
+        this.name = name;
+    }
+
     public SolrQueuedThreadPool(@Name("maxThreads") int maxThreads)
     {
         this(maxThreads, Math.min(8, maxThreads));