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 2020/09/22 09:59:37 UTC

[GitHub] [hadoop-ozone] ChenSammi commented on a change in pull request #1431: HDDS-4254. Bucket space: add usedBytes and update it when create and delete key.

ChenSammi commented on a change in pull request #1431:
URL: https://github.com/apache/hadoop-ozone/pull/1431#discussion_r492614416



##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/key/OMAllocateBlockResponse.java
##########
@@ -72,5 +76,10 @@ public void addToDBBatch(OMMetadataManager omMetadataManager,
     omMetadataManager.getVolumeTable().putWithBatch(batchOperation,
         omMetadataManager.getVolumeKey(omVolumeArgs.getVolume()),
         omVolumeArgs);
+    // update bucket usedBytes.
+    omMetadataManager.getBucketTable().putWithBatch(batchOperation,
+        omMetadataManager.getBucketKey(omVolumeArgs.getVolume(),
+            omBucketInfo.getBucketName()),
+        omBucketInfo);

Review comment:
       the last two lines can be merged into one line.




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

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



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