danny0405 commented on code in PR #8783:
URL: https://github.com/apache/hudi/pull/8783#discussion_r1212579733
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/HoodieTimelineArchiver.java:
##########
@@ -460,19 +465,12 @@ private Stream<HoodieInstant>
getCommitInstantsToArchive() throws IOException {
return !(firstSavepoint.isPresent() &&
compareTimestamps(firstSavepoint.get().getTimestamp(), LESSER_THAN_OR_EQUALS,
s.getTimestamp()));
}
}).filter(s -> {
- // Ensure commits >= the oldest pending compaction/replace commit
is retained
- return oldestPendingCompactionAndReplaceInstant
+ // oldestCommitToRetain is the highest completed commit instant
that is less than the oldest inflight instant.
+ // By filter out any commit >= oldestCommitToRetain, we can ensure
there are no gaps in the timeline
+ // when inflight commits are present.
+ return oldestCommitToRetain
Review Comment:
Yeah, it can fixes https://github.com/apache/hudi/pull/7738, although a
little obscure to understand.
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/HoodieTimelineArchiver.java:
##########
@@ -460,19 +465,12 @@ private Stream<HoodieInstant>
getCommitInstantsToArchive() throws IOException {
return !(firstSavepoint.isPresent() &&
compareTimestamps(firstSavepoint.get().getTimestamp(), LESSER_THAN_OR_EQUALS,
s.getTimestamp()));
}
}).filter(s -> {
- // Ensure commits >= the oldest pending compaction/replace commit
is retained
- return oldestPendingCompactionAndReplaceInstant
+ // oldestCommitToRetain is the highest completed commit instant
that is less than the oldest inflight instant.
+ // By filter out any commit >= oldestCommitToRetain, we can ensure
there are no gaps in the timeline
+ // when inflight commits are present.
+ return oldestCommitToRetain
Review Comment:
Yeah, it can fix https://github.com/apache/hudi/pull/7738, although a little
obscure to understand.
--
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]