nsivabalan commented on code in PR #6267:
URL: https://github.com/apache/hudi/pull/6267#discussion_r938373333


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/clean/CleanPlanner.java:
##########
@@ -248,17 +248,17 @@ private Pair<Boolean, List<CleanFileInfo>> 
getFilesToCleanKeepingLatestVersions(
 
       while (fileSliceIterator.hasNext() && keepVersions > 0) {
         // Skip this most recent version
+        fileSliceIterator.next();
+        keepVersions--;
+      }
+      // Delete the remaining files
+      while (fileSliceIterator.hasNext()) {

Review Comment:
   looks good to me. can you confirm that fileSliceIterator return file slices 
in reverse order ? 



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