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/14 14:31:08 UTC

[lucene-solr] branch reference_impl updated (f61500dd -> e7d6327)

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

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


    from f61500dd #136 - Start removing one off test executors.
     new f8911ef  #137 - Move close check under this sync call.
     new e7d6327  #138 - Min 2 per thread thread pool size (from 1).

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 solr/core/src/java/org/apache/solr/core/SolrCore.java   | 6 ++----
 solr/solrj/src/java/org/apache/solr/common/ParWork.java | 6 +++---
 2 files changed, 5 insertions(+), 7 deletions(-)


[lucene-solr] 02/02: #138 - Min 2 per thread thread pool size (from 1).

Posted by ma...@apache.org.
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

commit e7d632720b11b00570d38ef3648bb223ab863479
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Tue Jul 14 09:30:44 2020 -0500

    #138 - Min 2 per thread thread pool size (from 1).
---
 solr/solrj/src/java/org/apache/solr/common/ParWork.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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 acafafe..e9c23d1 100644
--- a/solr/solrj/src/java/org/apache/solr/common/ParWork.java
+++ b/solr/solrj/src/java/org/apache/solr/common/ParWork.java
@@ -564,16 +564,16 @@ public class ParWork implements Closeable {
     if (ourLoad > 1) {
       int cMax = executor.getMaximumPoolSize();
       if (cMax > 2) {
-        executor.setMaximumPoolSize(Math.max(1, (int) ((double)cMax * 0.60D)));
+        executor.setMaximumPoolSize(Math.max(2, (int) ((double)cMax * 0.60D)));
       }
     } else {
       double sLoad = load / (double) PROC_COUNT;
       if (sLoad > 1.0D) {
         int cMax =  executor.getMaximumPoolSize();
         if (cMax > 2) {
-          executor.setMaximumPoolSize(Math.max(1, (int) ((double) cMax * 0.60D)));
+          executor.setMaximumPoolSize(Math.max(2, (int) ((double) cMax * 0.60D)));
         }
-      } else if (sLoad < 0.9D && MAXIMUM_POOL_SIZE !=  executor.getMaximumPoolSize()) {
+      } else if (sLoad < 0.9D && MAXIMUM_POOL_SIZE != executor.getMaximumPoolSize()) {
         executor.setMaximumPoolSize(MAXIMUM_POOL_SIZE);
       }
       log.info("external request, load:" + sLoad); //nocommit: remove when testing is done


[lucene-solr] 01/02: #137 - Move close check under this sync call.

Posted by ma...@apache.org.
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

commit f8911ef3fa71cc66addf49084135d7d79a7e12ff
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Tue Jul 14 09:30:09 2020 -0500

    #137 - Move close check under this sync call.
---
 solr/core/src/java/org/apache/solr/core/SolrCore.java | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/core/SolrCore.java b/solr/core/src/java/org/apache/solr/core/SolrCore.java
index e3cc6c1..d866eaf 100644
--- a/solr/core/src/java/org/apache/solr/core/SolrCore.java
+++ b/solr/core/src/java/org/apache/solr/core/SolrCore.java
@@ -2100,9 +2100,7 @@ public final class SolrCore implements SolrInfoBean, Closeable {
     boolean success = false;
     openSearcherLock.lock();
     try {
-      if (isClosed() || (getCoreContainer() != null && getCoreContainer().isShutDown())) {
-        throw new AlreadyClosedException();
-      }
+
       String newIndexDir = getNewIndexDir();
       String indexDirFile = null;
       String newIndexDirFile = null;
@@ -2114,7 +2112,7 @@ public final class SolrCore implements SolrInfoBean, Closeable {
       }
 
       synchronized (searcherLock) {
-        if (isClosed()) { // if we start new searchers after close we won't close them
+        if (isClosed() || (getCoreContainer() != null && getCoreContainer().isShutDown())) { // if we start new searchers after close we won't close them
           throw new SolrCoreState.CoreIsClosedException();
         }