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 also use
`!s.isCompleted()` here to give a more clear and unified semantics and add
comments here. cc @vinothchandar thoughts?
--
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]