nastra commented on code in PR #9354: URL: https://github.com/apache/iceberg/pull/9354#discussion_r1433651142
########## 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: we can't null out `cachedNewDeleteManifests` because it's `final`. So the only thing that's being done in the code is to clear that collection -- 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