denis-chudov commented on a change in pull request #9243:
URL: https://github.com/apache/ignite/pull/9243#discussion_r685963524



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
##########
@@ -5524,27 +5526,85 @@ private void restorePartitionStates(
 
             ExecutorService sysPool = ctx.pools().getSystemExecutorService();
 
-            CountDownLatch completionLatch = new 
CountDownLatch(forGroups.size());
-
             AtomicReference<SortedSet<T3<Long, Long, GroupPartitionId>>> 
topPartRef = new AtomicReference<>();
 
             long totalPart = forGroups.stream().mapToLong(grpCtx -> 
grpCtx.affinity().partitions()).sum();
 
-            for (CacheGroupContext grp : forGroups) {
-                sysPool.execute(() -> {
+            int poolSize = ctx.config().getSystemThreadPoolSize();
+
+            List<List<GroupPartitionId>> partIds = new ArrayList<>(poolSize);
+
+            for (int i = 0; i < poolSize; i++)
+                partIds.add(new LinkedList<>());
+
+            int cntr = 0;
+
+            // Group id -> (group ctx, completed partitions counter)
+            Map<Integer, T2<CacheGroupContext, AtomicInteger>> grps = new 
HashMap<>();

Review comment:
       totalProcessed is still used in logging.




-- 
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