the-other-tim-brown commented on code in PR #10976:
URL: https://github.com/apache/hudi/pull/10976#discussion_r1579440430


##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieDefaultTimeline.java:
##########
@@ -540,10 +542,10 @@ private Option<HoodieInstant> 
getLastOrFirstPendingClusterInstant(boolean isLast
 
   @Override
   public boolean isPendingClusterInstant(String instantTime) {
-    HoodieTimeline potentialTimeline = 
getCommitsTimeline().filterPendingReplaceTimeline().filter(i -> 
i.getTimestamp().equals(instantTime));
-    if (potentialTimeline.countInstants() == 0) {
+    if (!getOrCreatePendingReplaceInstantSet().contains(instantTime)) {
       return false;
     }
+    HoodieTimeline potentialTimeline = 
getCommitsTimeline().filterPendingReplaceTimeline().filter(i -> 
i.getTimestamp().equals(instantTime));
     if (potentialTimeline.countInstants() > 1) {
       throw new IllegalStateException("Multiple instants with same timestamp: 
" + potentialTimeline);

Review Comment:
   Makes sense, I've moved that and the check to see if the replace commit is 
actually a clustering commit into the caching step



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