spacemonkd commented on code in PR #10588:
URL: https://github.com/apache/ozone/pull/10588#discussion_r3534488542


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/multipart/S3MultipartUploadCompleteRequest.java:
##########
@@ -612,8 +657,26 @@ private long getMultipartDataSize(String requestedVolume,
       currentPartCount++;
       int partNumber = part.getPartNumber();
       PartKeyInfo partKeyInfo = partKeyInfoMap.get(partNumber);
-      MultipartCommitRequestPart requestPart = eTagBasedValidationAvailable ?
-          eTagBasedValidator.apply(part, partKeyInfo) : 
partNameBasedValidator.apply(part, partKeyInfo);
+      OmMultipartPartInfo multipartPartInfo =
+          multipartPartInfoMap.get(partNumber);
+      MultipartCommitRequestPart requestPart;
+      if (multipartPartInfo != null) {
+        String requestPartId;
+        String omPartId;
+        if (eTagBasedValidationAvailable) {
+          requestPartId = part.getETag();
+          omPartId = multipartPartInfo.getETag();
+        } else {
+          requestPartId = part.getPartName();
+          omPartId = multipartPartInfo.getPartName();
+        }
+        requestPart = new MultipartCommitRequestPart(
+            requestPartId, omPartId, StringUtils.equals(requestPartId, 
omPartId));

Review Comment:
   I just realized that the partKeyInfoMap normalizes to add the split part 
information in the same object.
   I simplified this in the latest commit. Can you please take a look now?



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