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 2021/12/27 21:17:15 UTC

[GitHub] [hudi] nsivabalan commented on a change in pull request #4443: [HUDI-3101] Excluding compaction instants from pending rollback info

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



##########
File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/AbstractHoodieWriteClient.java
##########
@@ -902,10 +902,14 @@ private HoodieTimeline getInflightTimelineExcludeCompactionAndClustering(HoodieT
   protected Map<String, Option<HoodiePendingRollbackInfo>> getPendingRollbackInfos(HoodieTableMetaClient metaClient) {
     List<HoodieInstant> instants = metaClient.getActiveTimeline().filterPendingRollbackTimeline().getInstants().collect(Collectors.toList());
     Map<String, Option<HoodiePendingRollbackInfo>> infoMap = new HashMap<>();
+    HoodieTimeline pendingCompactionTimeline = metaClient.getActiveTimeline().filterPendingCompactionTimeline();
     for (HoodieInstant instant : instants) {
       try {
         HoodieRollbackPlan rollbackPlan = RollbackUtils.getRollbackPlan(metaClient, instant);
-        infoMap.putIfAbsent(rollbackPlan.getInstantToRollback().getCommitTime(), Option.of(new HoodiePendingRollbackInfo(instant, rollbackPlan)));
+        String instantToRollback = rollbackPlan.getInstantToRollback().getCommitTime();
+        if (!pendingCompactionTimeline.containsInstant(instantToRollback)) {

Review comment:
       @danny0405 : we should also ignore  pending clustering from here if I am not wrong. 




-- 
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