eric9204 commented on code in PR #9331:
URL: https://github.com/apache/hudi/pull/9331#discussion_r1329655400


##########
hudi-platform-service/hudi-metaserver/hudi-metaserver-client/src/main/java/org/apache/hudi/metaserver/client/HoodieMetaserverClientImp.java:
##########
@@ -109,7 +110,7 @@ public void createTable(Table table) {
   @Override
   public List<HoodieInstant> listInstants(String db, String tb, int commitNum) 
{
     return exceptionWrapper(() -> this.client.listInstants(db, tb, 
commitNum).stream()
-        .map(EntityConversions::fromTHoodieInstant)
+        
.map(EntityConversions::fromTHoodieInstant).sorted(Comparator.comparing(HoodieInstant::getTimestamp))

Review Comment:
   @yihua Thank you for your reply!
   
   Yes, you are right. I had changed `24` to `-1` in the constructor of 
`HoodieMetaserverBasedTimeline`, so the test was successful in my local env.
   
   If there is the `limit clause` and the `limit > 0`, We won't get the latest 
instants.
   
   So, we need to sort the instants by instant time in descending order based 
on the server-side logic.



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