You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/02/09 15:08:49 UTC

[GitHub] [hudi] nsivabalan commented on a change in pull request #4772: [HUDI-3362] Fix restore to rollback pending clustering operations followed by other rolling back other commits

nsivabalan commented on a change in pull request #4772:
URL: https://github.com/apache/hudi/pull/4772#discussion_r802761039



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/ClusteringUtils.java
##########
@@ -215,6 +215,12 @@ public static HoodieClusteringPlan createClusteringPlan(String strategyClassName
   }
 
   public static List<HoodieInstant> getPendingClusteringInstantTimes(HoodieTableMetaClient metaClient) {
-    return metaClient.getActiveTimeline().filterPendingReplaceTimeline().getInstants().collect(Collectors.toList());
+    return metaClient.getActiveTimeline().filterPendingReplaceTimeline().getInstants()
+            .filter(instant -> isPendingClusteringInstant(metaClient, instant))

Review comment:
       CC @codope 

##########
File path: hudi-common/src/main/java/org/apache/hudi/common/util/ClusteringUtils.java
##########
@@ -215,6 +215,12 @@ public static HoodieClusteringPlan createClusteringPlan(String strategyClassName
   }
 
   public static List<HoodieInstant> getPendingClusteringInstantTimes(HoodieTableMetaClient metaClient) {
-    return metaClient.getActiveTimeline().filterPendingReplaceTimeline().getInstants().collect(Collectors.toList());
+    return metaClient.getActiveTimeline().filterPendingReplaceTimeline().getInstants()
+            .filter(instant -> isPendingClusteringInstant(metaClient, instant))

Review comment:
       thanks for the fix, I was planning to ask the same which I detected while investigating the issue. good you fixed it :) 




-- 
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: commits-unsubscribe@hudi.apache.org

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