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



##########
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:
       > do we need this fix
   We need this fix to keep the correct semantics.
   
   You can not assume that any INFLIGHT compaction instants would finally be 
committed successfully. Although you might rolls back the legacy compaction but 
at least we should keep the method do the right thing.




-- 
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:
[email protected]


Reply via email to