lokeshj1703 commented on code in PR #11553: URL: https://github.com/apache/hudi/pull/11553#discussion_r1668053090
########## hudi-cli/src/main/java/org/apache/hudi/cli/commands/ArchivedCommitsCommand.java: ########## @@ -241,6 +241,7 @@ private Comparable[] readCommit(GenericRecord record, boolean skipMetadata) { case HoodieTimeline.COMPACTION_ACTION: return commitDetail(record, "hoodieCompactionMetadata", skipMetadata); case HoodieTimeline.REPLACE_COMMIT_ACTION: + case HoodieTimeline.CLUSTER_ACTION: Review Comment: Addressed ########## hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieTableServiceClient.java: ########## @@ -821,16 +821,8 @@ protected void archive(HoodieTable table) { * @return */ private HoodieTimeline getInflightTimelineExcludeCompactionAndClustering(HoodieTableMetaClient metaClient) { - HoodieTimeline inflightTimelineWithReplaceCommit = metaClient.getCommitsTimeline().filterPendingExcludingCompaction(); - HoodieTimeline inflightTimelineExcludeClusteringCommit = inflightTimelineWithReplaceCommit.filter(instant -> { - if (instant.getAction().equals(HoodieTimeline.REPLACE_COMMIT_ACTION)) { - Option<Pair<HoodieInstant, HoodieClusteringPlan>> instantPlan = ClusteringUtils.getClusteringPlan(metaClient, instant); - return !instantPlan.isPresent(); - } else { - return true; - } - }); - return inflightTimelineExcludeClusteringCommit; + HoodieTimeline inflightTimelineExcludingCompaction = metaClient.getCommitsTimeline().filterPendingExcludingCompaction(); + return inflightTimelineExcludingCompaction.filter(instant -> !ClusteringUtils.isClusteringInstant(inflightTimelineExcludingCompaction, instant)); Review Comment: > For backwards compatibility purpose, we had to consider pending replace commits also in addition to pending clustering commits. So, lets ensure to check both timeline for now. If we are going to check both timeline, then this would remain as it is? Similarly for the other comment. -- 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-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org