swamirishi commented on code in PR #8587:
URL: https://github.com/apache/ozone/pull/8587#discussion_r2149572379


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMDirectoriesPurgeRequestWithFSO.java:
##########
@@ -172,17 +171,26 @@ public OMClientResponse 
validateAndUpdateCache(OzoneManager ozoneManager, Execut
           }
         }
         if (path.hasDeletedDir()) {
+          // Using deletedDirInfo since there is no reverse mapping for 
volumeId and bucketId.
+          OmKeyInfo deletedDirInfo = 
omMetadataManager.getDeletedDirTable().get(path.getDeletedDir());
+          if (deletedDirInfo != null) {
+            OmBucketInfo omBucketInfo = getBucketInfo(omMetadataManager,
+                deletedDirInfo.getVolumeName(), 
deletedDirInfo.getBucketName());
+            omBucketInfo.purgePendingDeleteSnapshotNamespace(1);
+          }
           numDirsDeleted++;
         }
       }
       deletingServiceMetrics.incrNumSubDirectoriesMoved(numSubDirMoved);
       deletingServiceMetrics.incrNumSubFilesMoved(numSubFilesMoved);
       deletingServiceMetrics.incrNumDirPurged(numDirsDeleted);
-
+      TransactionInfo transactionInfo = 
TransactionInfo.valueOf(context.getTermIndex());
       if (fromSnapshotInfo != null) {

Review Comment:
   done



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyRequest.java:
##########
@@ -912,9 +912,9 @@ protected void checkBucketQuotaInBytes(
       OMMetadataManager metadataManager, OmBucketInfo omBucketInfo,
       long allocateSize) throws IOException {
     if (omBucketInfo.getQuotaInBytes() > OzoneConsts.QUOTA_RESET) {
-      long usedBytes = omBucketInfo.getUsedBytes();
+      long usedBytes = omBucketInfo.getTotalBucketSpace();
       long quotaInBytes = omBucketInfo.getQuotaInBytes();
-      if (quotaInBytes - usedBytes < allocateSize) {
+      if (quotaInBytes - usedBytes  < allocateSize) {

Review Comment:
   done



-- 
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-unsubscr...@ozone.apache.org

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


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

Reply via email to