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/06/20 03:39:41 UTC

[GitHub] [hudi] leesf commented on a change in pull request #3109: [HUDI-2043] HoodieDefaultTimeline$filterPendingCompactionTImeline() m…

leesf commented on a change in pull request #3109:
URL: https://github.com/apache/hudi/pull/3109#discussion_r654870791



##########
File path: hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieDefaultTimeline.java
##########
@@ -127,7 +127,7 @@ public HoodieTimeline filterPendingReplaceTimeline() {
   @Override
   public HoodieTimeline filterPendingCompactionTimeline() {
     return new HoodieDefaultTimeline(
-        instants.stream().filter(s -> s.getAction().equals(HoodieTimeline.COMPACTION_ACTION)), details);
+        instants.stream().filter(s -> s.getAction().equals(HoodieTimeline.COMPACTION_ACTION) && !s.isCompleted()), details);

Review comment:
       In fact when action equals to `COMPACTION_ACTION`, it means the compaction is pending(requested or inflight), since the state of COMPACTION is `xxx.compaction.requested -> xxx.compaction.inflight -> xxx.commit`, so i think it should be ok to filter pending compaction here, however we would add comment for this.




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