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/04/12 23:11:23 UTC

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

yihua commented on code in PR #4443:
URL: https://github.com/apache/hudi/pull/4443#discussion_r848939875


##########
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:
   This is fixed on latest master.



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