danny0405 commented on code in PR #20394:
URL: https://github.com/apache/hudi/pull/20394#discussion_r4408074328
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/timeline/LegacyArchivedMetaEntryReader.java:
##########
@@ -184,6 +185,20 @@ public void close() {
@Override
public boolean hasNext() {
+ List<Pair<HoodieInstant, Option<byte[]>>> instantAndDetails =
readNextInstantGroup();
+ // Legacy archives can hold instants that never completed (e.g. a
requested-only commit); they are not part of the timeline.
+ while (!instantAndDetails.isEmpty() &&
instantAndDetails.stream().noneMatch(instantAndDetail ->
instantAndDetail.getKey().isCompleted())) {
Review Comment:
> So a commit whose INFLIGHT and COMPLETED files failed to convert ends up
in the archive with only its REQUESTED record, and gone from the active
timeline.
In this case, we should assume the instant is complete so that to avoid the
metadata loss, since 1.x relies on the instant completime for queries, if the
instant is missing, then the instant would be deemed as pending.
--
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]