You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/08/02 05:29:45 UTC

[GitHub] [iceberg] abmo-x commented on a diff in pull request #5311: S3OutputStream - failure to close should persist on subsequent close calls

abmo-x commented on code in PR #5311:
URL: https://github.com/apache/iceberg/pull/5311#discussion_r935128214


##########
aws/src/main/java/org/apache/iceberg/aws/s3/S3OutputStream.java:
##########
@@ -240,6 +241,13 @@ private void newStream() throws IOException {
 
   @Override
   public void close() throws IOException {
+
+    // A failed s3 close removes state that is required for a successful close.
+    if (closeFailureException != null) {
+      throw new IOException(
+          "Attempted to close a S3 stream that failed to close earlier", closeFailureException);

Review Comment:
   Thanks for the suggestion @stevenzwu, made few changes based on the suggestion.



-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org