suryaprasanna commented on code in PR #17943:
URL: https://github.com/apache/hudi/pull/17943#discussion_r2791488169


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/clean/CleanPlanner.java:
##########
@@ -184,14 +184,15 @@ private boolean canCleanBeSkipped() {
     }
 
     // Check whether there are any other commits apart from deltacommits 
between last compaction and last clean.
-    int nonDeltaCommitsBetweenCompactionAndClean = activeTimeline
-        .findInstantsAfter(lastCompactionInstant.get().requestedTime())
-        .findInstantsBefore(lastCleanInstant.get().requestedTime())
+    int numNonDeltaCommitsAfterLastClean = activeTimeline
+        .getWriteTimeline()
+        .filterCompletedInstants()
+        .findInstantsAfter(lastCleanInstant.get().requestedTime())
         .filter(instant -> 
!instant.getAction().equals(HoodieTimeline.DELTA_COMMIT_ACTION))
         .countInstants();
     return 
InstantComparison.compareTimestamps(lastCompactionInstant.get().getCompletionTime(),

Review Comment:
   Yeah, I agree. Making the change.



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