You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by an...@apache.org on 2014/06/07 01:44:43 UTC
svn commit: r1601038 -
/lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
Author: anshum
Date: Fri Jun 6 23:44:43 2014
New Revision: 1601038
URL: http://svn.apache.org/r1601038
Log:
SOLR-6148: Trying to fix Jenkins failures by not LazyLoading the ParallelExecutor in CoreAdminHandler
Modified:
lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java?rev=1601038&r1=1601037&r2=1601038&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/CoreAdminHandler.java Fri Jun 6 23:44:43 2014
@@ -119,6 +119,8 @@ public class CoreAdminHandler extends Re
// Unlike most request handlers, CoreContainer initialization
// should happen in the constructor...
this.coreContainer = null;
+ this.parallelExecutor = Executors.newFixedThreadPool(50,
+ new DefaultSolrThreadFactory("parallelCoreAdminExecutor"));
}
@@ -129,6 +131,8 @@ public class CoreAdminHandler extends Re
*/
public CoreAdminHandler(final CoreContainer coreContainer) {
this.coreContainer = coreContainer;
+ this.parallelExecutor = Executors.newFixedThreadPool(50,
+ new DefaultSolrThreadFactory("parallelCoreAdminExecutor"));
}
@@ -186,10 +190,7 @@ public class CoreAdminHandler extends Re
handleRequestInternal(req, rsp, action);
} else {
ParallelCoreAdminHandlerThread parallelHandlerThread = new ParallelCoreAdminHandlerThread(req, rsp, action, taskObject);
- if(parallelExecutor == null || parallelExecutor.isShutdown())
- parallelExecutor = Executors.newFixedThreadPool(50,
- new DefaultSolrThreadFactory("parallelCoreAdminExecutor"));
- parallelExecutor.execute(parallelHandlerThread);
+ parallelExecutor.execute(parallelHandlerThread);
}
}
Re: svn commit: r1601038 - /lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/CoreAdm
inHandler.java
Posted by Anshum Gupta <an...@anshumgupta.net>.
The second ctor is only used by a mock, which I didn't look into much
so just added it to both the places.
I'll just make it final and inline it.
On Fri, Jun 6, 2014 at 5:28 PM, Chris Hostetter
<ho...@fucit.org> wrote:
>
> : @@ -119,6 +119,8 @@ public class CoreAdminHandler extends Re
> ...
> : @@ -129,6 +131,8 @@ public class CoreAdminHandler extends Re
>
> Doing the same init in 2 places seems prone to future errors -- why not
> just inline it with the declaration of the "parallelExecutor" (and make it
> final while we're at it)
>
>
> -Hoss
> http://www.lucidworks.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
--
Anshum Gupta
http://www.anshumgupta.net
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: svn commit: r1601038 -
/lucene/dev/trunk/solr/core/src/java/org/apache/solr/handler/admin/CoreAdm
inHandler.java
Posted by Chris Hostetter <ho...@fucit.org>.
: @@ -119,6 +119,8 @@ public class CoreAdminHandler extends Re
...
: @@ -129,6 +131,8 @@ public class CoreAdminHandler extends Re
Doing the same init in 2 places seems prone to future errors -- why not
just inline it with the declaration of the "parallelExecutor" (and make it
final while we're at it)
-Hoss
http://www.lucidworks.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org