ad1happy2go commented on code in PR #20394:
URL: https://github.com/apache/hudi/pull/20394#discussion_r4562070906


##########
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:
   Done in af2afde863d. Such an instant is now treated as completed, using the 
transition time of its latest archived state as the completion time, so it 
keeps its completion time in the LSM timeline. Its records are held until the 
archive is read, because the completed record can sit in another block, and the 
upgrade now sorts each batch so these instants stay inside the LSM file range.



-- 
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]

Reply via email to