palashc commented on code in PR #2252:
URL: https://github.com/apache/phoenix/pull/2252#discussion_r2241016856


##########
phoenix-core-server/src/main/java/org/apache/phoenix/coprocessor/UncoveredGlobalIndexRegionScanner.java:
##########
@@ -97,10 +124,16 @@ public UncoveredGlobalIndexRegionScanner(final 
RegionScanner innerScanner, final
     rowCountPerTask =
       config.getInt(INDEX_ROW_COUNTS_PER_TASK_CONF_KEY, 
DEFAULT_INDEX_ROW_COUNTS_PER_TASK);
 
-    pool = new WaitForCompletionTaskRunner(ThreadPoolManager
-      .getExecutor(new ThreadPoolBuilder("Uncovered Global Index", 
env.getConfiguration())
-        .setMaxThread(NUM_CONCURRENT_INDEX_THREADS_CONF_KEY, 
DEFAULT_CONCURRENT_INDEX_THREADS)
-        .setCoreTimeout(INDEX_WRITER_KEEP_ALIVE_TIME_CONF_KEY), env));
+    try {
+      pool = getRegionThreadPoolCache().get(region,
+        () -> new WaitForCompletionTaskRunner(ThreadPoolManager
+          .getExecutor(new ThreadPoolBuilder("Uncovered Global Index", 
env.getConfiguration())
+            .setMaxThread(NUM_CONCURRENT_INDEX_THREADS_CONF_KEY, 
DEFAULT_CONCURRENT_INDEX_THREADS)

Review Comment:
   makes sense



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@phoenix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to