RussellSpitzer commented on a change in pull request #2985:
URL: https://github.com/apache/iceberg/pull/2985#discussion_r693210356



##########
File path: core/src/main/java/org/apache/iceberg/MergingSnapshotProducer.java
##########
@@ -458,10 +461,12 @@ private void cleanUncommittedAppends(Set<ManifestFile> 
committed) {
       this.cachedNewManifest = null;
     }
 
-    if (cachedNewDeleteManifest != null && 
!committed.contains(cachedNewDeleteManifest)) {
-      deleteFile(cachedNewDeleteManifest.path());
-      this.cachedNewDeleteManifest = null;
+    for (ManifestFile cachedNewDeleteManifest : cachedNewDeleteManifests) {
+      if (!committed.contains(cachedNewDeleteManifest)) {
+        deleteFile(cachedNewDeleteManifest.path());
+      }
     }
+    this.cachedNewDeleteManifests.clear();

Review comment:
       Do we need the explicit clear here? Are we just trying to free it up for 
GC early?




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to