rdblue commented on a change in pull request #1767:
URL: https://github.com/apache/iceberg/pull/1767#discussion_r523287086
##########
File path: aws/src/main/java/org/apache/iceberg/aws/s3/S3OutputStream.java
##########
@@ -87,17 +190,105 @@ public void close() throws IOException {
super.close();
closed = true;
+ currentStagingFile = null;
try {
stream.close();
+ completeUploads();
Review comment:
It looks like uploading the last part depends on the line above where
`currentStagingFile` is set to `null`. Otherwise, the current part is ignored
in `uploadParts`. This leads to slightly confusing behavior for
`completeUploads` because it won't include the last part unless that assumption
is met.
What about making `completeUploads` ensure the current stream is closed and
null using a `closeCurrent` method?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]