ivandika3 commented on code in PR #8506:
URL: https://github.com/apache/ozone/pull/8506#discussion_r2106139934


##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java:
##########
@@ -896,15 +903,21 @@ public Response 
completeMultipartUpload(@PathParam("bucket") String bucket,
         LOG.debug("Parts map {}", partsMap);
       }
 
-      omMultipartUploadCompleteInfo = getClientProtocol()
+      OmMultipartUploadCompleteInfo omMultipartUploadCompleteInfo = 
getClientProtocol()
           .completeMultipartUpload(volume.getName(), bucket, key, uploadID,
               partsMap);
+      String serverEtag = omMultipartUploadCompleteInfo.getHash();
+      String encodedClientETag = headers.getHeaderString(CHECKSUM_HEADER);
+      if (S3Utils.isEtagMisMatch(encodedClientETag, serverEtag)) {
+        abortMultipartUpload(volume, bucket, key, uploadID);

Review Comment:
   Is this multipart upload abort specified in the AWS S3 spec? If not, I'd 
prefer not to abort the incomplete multipart uploads. User can abort it 
themselves or we can let the background multipart upload cleanup service to 
abort it after a while (default 7 days).



-- 
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]

Reply via email to