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/21 04:40:51 UTC

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

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



##########
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:
       yes makes sense to add the check (although, if the code is consistent with current behavior, do we need this fix?. it might be misleading?). I am happy to side with you both :)
   
   can we add a unit test around 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