rdblue commented on code in PR #7770:
URL: https://github.com/apache/iceberg/pull/7770#discussion_r1676563921


##########
core/src/main/java/org/apache/iceberg/SnapshotProducer.java:
##########
@@ -257,10 +273,48 @@ public Snapshot apply() {
           .run(index -> manifestFiles[index] = 
manifestsWithMetadata.get(manifests.get(index)));
 
       writer.addAll(Arrays.asList(manifestFiles));
+
+      if (manifestListKeyMetadata != null) {
+        writer.close();

Review Comment:
   This is going to result in a double close for encrypted manifest lists. 
Instead, I think this should use a try/finally pattern where `close` is called 
in `finally` instead of using try-with-resources.



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

Reply via email to