You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "eric9204 (via GitHub)" <gi...@apache.org> on 2023/09/19 06:55:52 UTC
[GitHub] [hudi] eric9204 commented on a diff in pull request #9331: [HUDI-6623] Move the sorting of HoodieMetaserverClient instants from …
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org