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/07 03:30:57 UTC

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

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


##########
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:
   Good point. Let's combine the identical.



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