Open hussein-awala opened 1 day ago
+1 to reverting the original change
+1 to reverting the original change
Yes, but there is indeed an edge case that leads to failure, and this fix is a revert + fix for the original problem. Manually closing the file stream that can be closed automatically is ugly, I agree, but sometimes we have to do it.
I'm open to any suggestion
For 1.7.1 I'd prefer to revert it, and follow up with a separate PR with a fix, but I'm OK either way.
For 1.7.1 I'd prefer to revert it, and follow up with a separate PR with a fix
Sounds good, I opened https://github.com/apache/iceberg/pull/11621 to revert the commit.
closes: #11582
11220 introduced a new bug instead of fixing the original issue, where it fixed the case where there is an exception in the
GZIPOutputStream
constructor, but if there is not, the stream will be closed when try-with-resources tries to close it and it will throw an exception.This PR: