stevenzwu commented on code in PR #5311:
URL: https://github.com/apache/iceberg/pull/5311#discussion_r935109853
##########
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:
This makes sense to me.
Nit: the error msg doesn't read smoothly. what about `Attempted to close a
S3 output stream that has earlier close failed already`.
--
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]