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/07/22 02:23:37 UTC

[lucene-solr] branch reference_impl updated: @284 Now we can up keepalive for the per request executor.

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

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


The following commit(s) were added to refs/heads/reference_impl by this push:
     new fa3b224  @284 Now we can up keepalive for the per request executor.
fa3b224 is described below

commit fa3b224f11a532f8164da8ab66bedbd1fb3cff4c
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Tue Jul 21 21:23:19 2020 -0500

    @284 Now we can up keepalive for the per request executor.
---
 solr/core/src/java/org/apache/solr/security/AuditLoggerPlugin.java | 1 +
 solr/solrj/src/java/org/apache/solr/common/ParWork.java            | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/security/AuditLoggerPlugin.java b/solr/core/src/java/org/apache/solr/security/AuditLoggerPlugin.java
index 373a3bf..303e410 100644
--- a/solr/core/src/java/org/apache/solr/security/AuditLoggerPlugin.java
+++ b/solr/core/src/java/org/apache/solr/security/AuditLoggerPlugin.java
@@ -339,6 +339,7 @@ public abstract class AuditLoggerPlugin implements Closeable, Runnable, SolrInfo
           timeSlept ++;
         } catch (InterruptedException ignored) {
           ParWork.propegateInterrupt(ignored);
+          break;
         }
       }
     }
diff --git a/solr/solrj/src/java/org/apache/solr/common/ParWork.java b/solr/solrj/src/java/org/apache/solr/common/ParWork.java
index 5182dcd..31c0674 100644
--- a/solr/solrj/src/java/org/apache/solr/common/ParWork.java
+++ b/solr/solrj/src/java/org/apache/solr/common/ParWork.java
@@ -598,7 +598,7 @@ public class ParWork implements Closeable {
     }
   }
 
-  public static synchronized ExecutorService getExecutor() {
+  public static ExecutorService getExecutor() {
      // if (executor != null) return executor;
     ExecutorService exec = THREAD_LOCAL_EXECUTOR.get();
     if (exec == null) {
@@ -607,7 +607,7 @@ public class ParWork implements Closeable {
       }
 
       // figure out thread usage - maybe try to adjust based on current thread count
-      exec = getExecutorService(0, Math.max(4, Runtime.getRuntime().availableProcessors() / 3), 1);
+      exec = getExecutorService(0, Math.max(4, Runtime.getRuntime().availableProcessors() / 3), 5000);
       THREAD_LOCAL_EXECUTOR.set(exec);
     }