You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/05/06 23:36:36 UTC

[GitHub] [ozone] kerneltime commented on a diff in pull request #3388: HDDS-6709. Fix bucket usedBytes while versioning is true.

kerneltime commented on code in PR #3388:
URL: https://github.com/apache/ozone/pull/3388#discussion_r867266645


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCommitRequestWithFSO.java:
##########
@@ -182,7 +182,7 @@ public OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
       long correctedSpace = omKeyInfo.getReplicatedSize() -
           allocatedLocationInfoList.size() * scmBlockSize * factor;
       // Subtract the size of blocks to be overwritten.
-      if (keyToDelete != null) {
+      if (keyToDelete != null && !omBucketInfo.getIsVersionEnabled()) {

Review Comment:
   Nit: Might be cleaner to combine the identical if conditions here and line 158



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org