mirror of https://github.com/apache/lucene.git
SOLR-6148: Trying to fix Jenkins failures by not LazyLoading the ParallelExecutor in CoreAdminHandler
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1601038 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
db538d864c
commit
df6d417c44
|
@ -119,6 +119,8 @@ public class CoreAdminHandler extends RequestHandlerBase {
|
|||
// 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 RequestHandlerBase {
|
|||
*/
|
||||
public CoreAdminHandler(final CoreContainer coreContainer) {
|
||||
this.coreContainer = coreContainer;
|
||||
this.parallelExecutor = Executors.newFixedThreadPool(50,
|
||||
new DefaultSolrThreadFactory("parallelCoreAdminExecutor"));
|
||||
}
|
||||
|
||||
|
||||
|
@ -186,10 +190,7 @@ public class CoreAdminHandler extends RequestHandlerBase {
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue