You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "yihua (via GitHub)" <gi...@apache.org> on 2024/03/22 17:40:41 UTC

Re: [PR] [HUDI-6882] Differentiate between replacecommits in cluster planning [hudi]

yihua commented on code in PR #9755:
URL: https://github.com/apache/hudi/pull/9755#discussion_r1535961867


##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieDefaultTimeline.java:
##########
@@ -490,6 +493,19 @@ public Option<HoodieInstant> getFirstNonSavepointCommit() {
     }
     return firstNonSavepointCommit;
   }
+
+  public Option<HoodieInstant> getLastClusterCommit() {
+    return  Option.fromJavaOptional(getCommitsTimeline().filter(s -> s.getAction().equalsIgnoreCase(HoodieTimeline.REPLACE_COMMIT_ACTION))
+        .getReverseOrderedInstants()
+        .filter(i -> {
+          try {
+            HoodieCommitMetadata metadata = TimelineUtils.getCommitMetadata(i, this);

Review Comment:
   This introduced a regression that the pending clustering is no longer considered when figuring out the `lastClusteringInstant`.



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