amogh-jahagirdar commented on code in PR #9354: URL: https://github.com/apache/iceberg/pull/9354#discussion_r1433360860
########## core/src/main/java/org/apache/iceberg/MergingSnapshotProducer.java: ########## @@ -892,15 +892,18 @@ private void cleanUncommittedAppends(Set<ManifestFile> committed) { } } - ListIterator<ManifestFile> deleteManifestsIterator = cachedNewDeleteManifests.listIterator(); - while (deleteManifestsIterator.hasNext()) { - ManifestFile deleteManifest = deleteManifestsIterator.next(); - if (!committed.contains(deleteManifest)) { - deleteFile(deleteManifest.path()); - deleteManifestsIterator.remove(); + boolean hasDeleteDeletes = false; + for (ManifestFile cachedNewDeleteManifest : cachedNewDeleteManifests) { + if (!committed.contains(cachedNewDeleteManifest)) { + deleteFile(cachedNewDeleteManifest.path()); + hasDeleteDeletes = true; Review Comment: Nit: I think a better name would be clearCachedDeleteManifests (but I see this was just following the pattern for data file manifests) -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org