danny0405 commented on code in PR #17770:
URL: https://github.com/apache/hudi/pull/17770#discussion_r2663634161


##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/versioning/v1/ArchivedTimelineLoaderV1.java:
##########
@@ -135,10 +137,12 @@ public void loadInstants(HoodieTableMetaClient metaClient,
                       if (hasLimit && loadedCount.get() >= limit.get()) {
                         return;
                       }
-                      String instantTime = 
r.get(HoodieTableMetaClient.COMMIT_TIME_KEY).toString();
+                      String instantTime = 
r.get(commitTimeFieldPosition).toString();
                       if (filter == null || filter.isInRange(instantTime)) {
                         boolean isNewInstant = 
instantsInRange.add(instantTime);
                         recordConsumer.accept(instantTime, r);
+                        // Oldest instant will be the first one processed
+                        lastInstantTime.compareAndSet(null, instantTime);

Review Comment:
   The file is sorted in reverse chronological order, that means latest 
archived instants are read first, but here we actually want to get the earliest 
instant right?



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