kaijchen commented on code in PR #3286:
URL: https://github.com/apache/ozone/pull/3286#discussion_r858340665


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/multipart/S3MultipartUploadCommitPartRequest.java:
##########
@@ -226,15 +226,9 @@ public OMClientResponse 
validateAndUpdateCache(OzoneManager ozoneManager,
           new CacheKey<>(openKey),
           new CacheValue<>(Optional.absent(), trxnLogIndex));
 
-      long scmBlockSize = ozoneManager.getScmBlockSize();
-      int factor = omKeyInfo.getReplicationConfig().getRequiredNodes();
       omBucketInfo = getBucketInfo(omMetadataManager, volumeName, bucketName);
-      // Block was pre-requested and UsedBytes updated when createKey and
-      // AllocatedBlock. The space occupied by the Key shall be based on
-      // the actual Key size, and the total Block size applied before should
-      // be subtracted.
-      long correctedSpace = omKeyInfo.getReplicatedSize() -
-          keyArgs.getKeyLocationsList().size() * scmBlockSize * factor;
+
+      long correctedSpace = omKeyInfo.getReplicatedSize();
       omBucketInfo.incrUsedBytes(correctedSpace);

Review Comment:
   Oops, if it's a multi-part key, where does usedNamespace get increased?



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