You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by da...@apache.org on 2023/09/21 08:16:12 UTC
[hudi] branch master updated: [HUDI-6581] Remove unnecessary validations in function getOldestInstantToRetainForClustering (#9265)
This is an automated email from the ASF dual-hosted git repository.
danny0405 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git
The following commit(s) were added to refs/heads/master by this push:
new c1062ff75be [HUDI-6581] Remove unnecessary validations in function getOldestInstantToRetainForClustering (#9265)
c1062ff75be is described below
commit c1062ff75be2ea9f6febc64ca3865e84c7e6c66d
Author: zhuanshenbsj1 <34...@users.noreply.github.com>
AuthorDate: Thu Sep 21 16:16:04 2023 +0800
[HUDI-6581] Remove unnecessary validations in function getOldestInstantToRetainForClustering (#9265)
---
.../java/org/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 894db11a2d1..eea644a0bbc 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 class ClusteringUtils {
} else {
oldestInstantToRetain = replaceTimeline.firstInstant();
}
-
- Option<HoodieInstant> pendingInstantOpt = replaceTimeline.filterInflights().firstInstant();
- if (pendingInstantOpt.isPresent()) {
- // Get the previous commit before the first inflight clustering instant.
- Option<HoodieInstant> 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;
}