lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ans...@apache.org
Subject [4/7] lucene-solr:branch_5_5: SOLR-8748: OverseerTaskProcessor limits number of concurrent tasks to just 10 even though the thread pool size is 100. The limit has now been increased to 100.
Date Thu, 21 Apr 2016 22:14:52 GMT
SOLR-8748: OverseerTaskProcessor limits number of concurrent tasks to just 10 even though the
thread pool size is 100. The limit has now been increased to 100.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/f1127db7
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/f1127db7
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/f1127db7

Branch: refs/heads/branch_5_5
Commit: f1127db72c7ac247f25420c34b49b92f3e156dd7
Parents: f9acafb
Author: Shalin Shekhar Mangar <shalin@apache.org>
Authored: Sat Feb 27 14:05:07 2016 +0530
Committer: Anshum Gupta <anshum@apache.org>
Committed: Thu Apr 21 14:54:56 2016 -0700

----------------------------------------------------------------------
 solr/CHANGES.txt                                      |  3 +++
 .../org/apache/solr/cloud/OverseerTaskProcessor.java  | 14 +++++++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f1127db7/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index d42e652..26e6888 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -95,6 +95,9 @@ Bug Fixes
 * SOLR-8420: Fix long overflow in sumOfSquares for Date statistics. (Tom Hill, Christine
Poerschke,
   Tomás Fernández Löbbe)
 
+* SOLR-8748: OverseerTaskProcessor limits number of concurrent tasks to just 10 even though
the thread pool
+  size is 100. The limit has now been increased to 100. (Scott Blum, shalin)
+
 ======================= 5.5.0 =======================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f1127db7/solr/core/src/java/org/apache/solr/cloud/OverseerTaskProcessor.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/OverseerTaskProcessor.java b/solr/core/src/java/org/apache/solr/cloud/OverseerTaskProcessor.java
index 1bda80c..26a90cb 100644
--- a/solr/core/src/java/org/apache/solr/cloud/OverseerTaskProcessor.java
+++ b/solr/core/src/java/org/apache/solr/cloud/OverseerTaskProcessor.java
@@ -58,9 +58,13 @@ import static org.apache.solr.common.params.CommonAdminParams.ASYNC;
  */
 public class OverseerTaskProcessor implements Runnable, Closeable {
 
-  public int maxParallelThreads = 10;
+  /**
+   * Maximum number of overseer collection operations which can be
+   * executed concurrently
+   */
+  public static final int MAX_PARALLEL_TASKS = 100;
 
-  public ExecutorService tpe ;
+  public ExecutorService tpe;
 
   private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
@@ -162,7 +166,7 @@ public class OverseerTaskProcessor implements Runnable, Closeable {
 
     // TODO: Make maxThreads configurable.
 
-    this.tpe = new ExecutorUtil.MDCAwareThreadPoolExecutor(5, 100, 0L, TimeUnit.MILLISECONDS,
+    this.tpe = new ExecutorUtil.MDCAwareThreadPoolExecutor(5, MAX_PARALLEL_TASKS, 0L, TimeUnit.MILLISECONDS,
         new SynchronousQueue<Runnable>(),
         new DefaultSolrThreadFactory("OverseerThreadFactory"));
     try {
@@ -183,7 +187,7 @@ public class OverseerTaskProcessor implements Runnable, Closeable {
 
           boolean waited = false;
 
-          while (runningTasks.size() > maxParallelThreads) {
+          while (runningTasks.size() > MAX_PARALLEL_TASKS) {
             synchronized (waitLock) {
               waitLock.wait(100);//wait for 100 ms or till a task is complete
             }
@@ -193,7 +197,7 @@ public class OverseerTaskProcessor implements Runnable, Closeable {
           if (waited)
             cleanUpWorkQueue();
 
-          List<QueueEvent> heads = workQueue.peekTopN(maxParallelThreads, runningZKTasks,
2000L);
+          List<QueueEvent> heads = workQueue.peekTopN(MAX_PARALLEL_TASKS, runningZKTasks,
2000L);
 
           if (heads == null)
             continue;


Mime
View raw message