danny0405 commented on code in PR #8443:
URL: https://github.com/apache/hudi/pull/8443#discussion_r1165056614
##########
hudi-common/src/main/java/org/apache/hudi/common/util/ClusteringUtils.java:
##########
@@ -243,23 +242,34 @@ public static Option<HoodieInstant>
getOldestInstantToRetainForClustering(
HoodieTimeline replaceTimeline =
activeTimeline.getTimelineOfActions(CollectionUtils.createSet(HoodieTimeline.REPLACE_COMMIT_ACTION));
if (!replaceTimeline.empty()) {
Option<HoodieInstant> cleanInstantOpt =
- activeTimeline.getCleanerTimeline().filter(instant ->
!instant.isCompleted()).firstInstant();
+
activeTimeline.getCleanerTimeline().filterCompletedInstants().lastInstant();
Review Comment:
Nice catch, using completed clean instants is more reliable.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]