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_r336987839
 
 

 ##########
 File path: 
modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/database/H2TreeIndex.java
 ##########
 @@ -887,6 +890,32 @@ public GridH2RowMessage toSearchRowMessage(SearchRow row) 
{
         return res;
     }
 
+    /**
+     * Removes all index rows that belong to the specific data partitions.
+     *
+     * @param parts Partitions.
+     * @param shouldStop Allows to check stop condition.
+     */
+    public void purge(Set<Integer> parts, IgniteCallable<Boolean> shouldStop) 
throws IgniteCheckedException {
+        if (F.isEmpty(parts))
+            return;
+
+        if (segments.length == 1)
 
 Review comment:
   What we gain with this optimization?
   Can we simply keep the for loop to make this code more clear?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to