ignite-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [ignite] nizhikov commented on a change in pull request #6982: IGNITE-12295: Index partition purge for file-based rebalancing
Date Mon, 21 Oct 2019 13:00:49 GMT
nizhikov commented on a change in pull request #6982: IGNITE-12295: Index partition purge for
file-based rebalancing
URL: https://github.com/apache/ignite/pull/6982#discussion_r337002778
 
 

 ##########
 File path: modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/PartitionsEvictManager.java
 ##########
 @@ -133,6 +151,81 @@ public void evictPartitionAsync(CacheGroupContext grp, GridDhtLocalPartition
par
         }
     }
 
+    /**
+     *
+     * @param grp Cache group context.
+     * @param parts Partitions.
+     * @throws IgniteCheckedException If failed.
+     * @return Future.
+     */
+    public IgniteInternalFuture<Void> purgePartitionsExclusively(CacheGroupContext
grp,
+        List<GridDhtLocalPartition> parts) throws IgniteCheckedException {
+        validateCacheGroupForExclusivePurge(grp);
+
+        if (F.isEmpty(parts))
+            return new GridFinishedFuture<>();
+
+        GroupEvictionContext grpEvictionCtx = evictionGroupsMap.computeIfAbsent(
+            grp.groupId(), (k) -> new GroupEvictionContext(grp));
+
+        ExclusivePurgeFuture fut = new ExclusivePurgeFuture(grpEvictionCtx, parts);
+
+        synchronized (mux) {
+            if (grpEvictionCtx.exclPurgeFut != null)
 
 Review comment:
   1. We should add {} braces for each multi-line if branch.
   
   2. How we expect callee handle the `IgniteCheckedException` we throw?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message