danny0405 commented on code in PR #11440:
URL: https://github.com/apache/hudi/pull/11440#discussion_r1683622608
##########
hudi-common/src/main/java/org/apache/hudi/common/util/ClusteringUtils.java:
##########
@@ -365,20 +370,56 @@ public static Option<HoodieInstant>
getEarliestInstantToRetainForClustering(
// TODO: This case has to be handled. HUDI-6352
retainLowerBound = cleanInstant.getTimestamp();
}
-
- oldestInstantToRetain = replaceOrClusterTimeline.filter(instant ->
- HoodieTimeline.compareTimestamps(
- instant.getTimestamp(),
- HoodieTimeline.GREATER_THAN_OR_EQUALS,
- retainLowerBound))
- .firstInstant();
+ oldestInstantToRetain =
replaceOrClusterTimeline.findInstantsAfterOrEquals(retainLowerBound).firstInstant();
} else {
oldestInstantToRetain = replaceOrClusterTimeline.firstInstant();
}
}
+ if (!shouldArchiveBeyondSavepoint) {
Review Comment:
It looks like this chagne is not necessary if we do not make changes to
lines L276 ~ L280 of `HoodieTimelineArchiver: `.
##########
hudi-common/src/main/java/org/apache/hudi/common/util/ClusteringUtils.java:
##########
@@ -365,20 +370,56 @@ public static Option<HoodieInstant>
getEarliestInstantToRetainForClustering(
// TODO: This case has to be handled. HUDI-6352
retainLowerBound = cleanInstant.getTimestamp();
}
-
- oldestInstantToRetain = replaceOrClusterTimeline.filter(instant ->
- HoodieTimeline.compareTimestamps(
- instant.getTimestamp(),
- HoodieTimeline.GREATER_THAN_OR_EQUALS,
- retainLowerBound))
- .firstInstant();
+ oldestInstantToRetain =
replaceOrClusterTimeline.findInstantsAfterOrEquals(retainLowerBound).firstInstant();
} else {
oldestInstantToRetain = replaceOrClusterTimeline.firstInstant();
}
}
+ if (!shouldArchiveBeyondSavepoint) {
Review Comment:
It looks like this change is not necessary if we do not make changes to
lines L276 ~ L280 of `HoodieTimelineArchiver: `.
--
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]