zstan commented on code in PR #13497:
URL: https://github.com/apache/ignite/pull/13497#discussion_r3819150505


##########
modules/core/src/main/java/org/apache/ignite/internal/management/cache/VerifyBackupPartitionsTask.java:
##########
@@ -94,15 +116,64 @@ public class VerifyBackupPartitionsTask extends 
ComputeTaskAdapter<CacheIdleVeri
     /** Checkpoint reason. */
     public static final String CP_REASON = "VerifyBackupPartitions";
 
-    /** Shared for tests. */
-    public static Supplier<ExecutorService> poolSupplier = 
IgniteForkJoinPool::commonPool;
+    /** Effective verify executor service. */
+    private static ExecutorService EXECUTOR_SERVICE;
 
     /** Injected logger. */
     @LoggerResource
     private IgniteLogger log;
 
-    /** */
-    private static final long serialVersionUID = 0L;
+    /** Initializes {@link #EXECUTOR_SERVICE}. */
+    public static ExecutorService initOrGetVerifyExecutor(String igniteName) {
+        if (EXECUTOR_SERVICE == null) {
+            synchronized (VerifyBackupPartitionsTask.class) {
+                if (EXECUTOR_SERVICE == null) {
+                    int maxPoolSz = 
IgniteSystemProperties.getInteger(VERIFY_POOL_SIZE, DFLT_VERIFY_POOL_SIZE);
+
+                    if (maxPoolSz < 1)
+                        throw new IgniteException(new 
IllegalArgumentException(VERIFY_POOL_SIZE + " must be greater than 0."));
+
+                    LinkedBlockingQueue<Runnable> actualJobQueue = new 
LinkedBlockingQueue<>();
+
+                    EXECUTOR_SERVICE = new IgniteThreadPoolExecutor(

Review Comment:
   probably we can try to use IgniteUtils.doInParallel instead of additional 
pool - yes it use FJ but not utilize is fully ? Also we have common place for 
pools : PoolProcessor



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to