You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/08/02 12:03:19 UTC

[GitHub] [ignite] denis-chudov commented on a change in pull request #9243: IGNITE-13558-3

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



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
##########
@@ -5524,58 +5527,82 @@ private void restorePartitionStates(
 
             ExecutorService sysPool = ctx.getSystemExecutorService();
 
-            CountDownLatch completionLatch = new CountDownLatch(forGroups.size());
-
             AtomicReference<SortedSet<T3<Long, Long, GroupPartitionId>>> topPartRef = new AtomicReference<>();
 
+            SortedSet<T3<Long, Long, GroupPartitionId>> topParts =
+                new ConcurrentSkipListSet<>(processedPartitionComparator());
+
             long totalPart = forGroups.stream().mapToLong(grpCtx -> grpCtx.affinity().partitions()).sum();
 
-            for (CacheGroupContext grp : forGroups) {
-                sysPool.execute(() -> {
-                    try {
-                        Map<Integer, Long> processed = grp.offheap().restorePartitionStates(partStates);
+            int poolSize = ctx.config().getSystemThreadPoolSize();
 
-                        totalProcessed.addAndGet(processed.size());
+            List<List<GroupPartitionId>> partIds = new ArrayList<>(poolSize);

Review comment:
       This is implied by the task statement - parallelization based on groups causes ineffective resources utilization when groups strongly differ from each other. Sizes of batches should be equal.




-- 
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: notifications-unsubscribe@ignite.apache.org

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