From 81fe0d50d5b296bd1349e32e2f7a2f1e681f8011 Mon Sep 17 00:00:00 2001 From: zhuanshenbsj1 Date: Sun, 23 Jul 2023 23:52:27 +0800 Subject: [PATCH] remove pending clustering check --- .../apache/hudi/common/util/ClusteringUtils.java | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/hudi-common/src/main/java/org/apache/hudi/common/util/ClusteringUtils.java b/hudi-common/src/main/java/org/apache/hudi/common/util/ClusteringUtils.java index 894db11a2d11d..eea644a0bbc2a 100644 --- a/hudi-common/src/main/java/org/apache/hudi/common/util/ClusteringUtils.java +++ b/hudi-common/src/main/java/org/apache/hudi/common/util/ClusteringUtils.java @@ -281,19 +281,6 @@ public static Option getEarliestInstantToRetainForClustering( } else { oldestInstantToRetain = replaceTimeline.firstInstant(); } - - Option pendingInstantOpt = replaceTimeline.filterInflights().firstInstant(); - if (pendingInstantOpt.isPresent()) { - // Get the previous commit before the first inflight clustering instant. - Option beforePendingInstant = activeTimeline.getCommitsTimeline() - .filterCompletedInstants() - .findInstantsBefore(pendingInstantOpt.get().getTimestamp()) - .lastInstant(); - if (beforePendingInstant.isPresent() - && oldestInstantToRetain.map(instant -> instant.compareTo(beforePendingInstant.get()) > 0).orElse(true)) { - oldestInstantToRetain = beforePendingInstant; - } - } } return oldestInstantToRetain; }