steveloughran commented on a change in pull request #575: HADOOP-13327 Output
Stream Specification
URL: https://github.com/apache/hadoop/pull/575#discussion_r342653390
##########
File path:
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3ABlockOutputStream.java
##########
@@ -344,10 +372,22 @@ private void initMultipartUpload() throws IOException {
*/
@Override
public void close() throws IOException {
- if (closed.getAndSet(true)) {
- // already closed
- LOG.debug("Ignoring close() as stream is already closed");
- return;
+ acquireLock(false);
+ try {
+ synchronized (this) {
+ // this is synchronized to order its execution w.r.t any methods
Review comment:
:)
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]