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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]