sumitagrawl commented on code in PR #9122:
URL: https://github.com/apache/ozone/pull/9122#discussion_r2426682761


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMDirectoriesPurgeRequestWithFSO.java:
##########
@@ -192,6 +197,13 @@ public OMClientResponse 
validateAndUpdateCache(OzoneManager ozoneManager, Execut
         }
         if (path.hasDeletedDir()) {
           deletedDirNames.add(path.getDeletedDir());
+          BucketNameInfo bucketNameInfo = volumeBucketIdMap.get(new 
VolumeBucketId(path.getVolumeId(),
+              path.getBucketId()));
+          OmBucketInfo omBucketInfo = getBucketInfo(omMetadataManager,
+              bucketNameInfo.getVolumeName(), bucketNameInfo.getBucketName());
+          if (omBucketInfo != null && omBucketInfo.getObjectID() == 
path.getBucketId()) {
+            omBucketInfo.purgeSnapshotUsedNamespace(1);

Review Comment:
   updated omBucketInfo is not added to volBucketInfoMap, if no sub-dir or 
sub-file, this will never gets updated



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyPurgeRequest.java:
##########
@@ -151,9 +157,64 @@ public OMClientResponse 
validateAndUpdateCache(OzoneManager ozoneManager, Execut
       
AUDIT.logWriteFailure(ozoneManager.buildAuditMessageForFailure(OMSystemAction.KEY_DELETION,
 null, e));
       return new OMKeyPurgeResponse(createErrorOMResponse(omResponse, e));
     }
+    try {
+      List<OmBucketInfo> bucketInfoList = 
updateBucketSize(purgeKeysRequest.getBucketPurgeKeysSizeList(),

Review Comment:
   why this is handled after audit logged as success, to be part of first 
tr-catch only.



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/KeyDeletingService.java:
##########
@@ -191,38 +250,50 @@ private Pair<Pair<Integer, Long>, Boolean> 
submitPurgeKeysRequest(
 
     // Step 1: Process DeleteBlockGroupResults
     for (DeleteBlockGroupResult result : results) {
-      String deletedKey = result.getObjectKey();
-      if (result.isSuccess()) {
-        // Add key to PurgeKeys list.
-        if (keysToModify != null && !keysToModify.containsKey(deletedKey)) {
-          // Parse Volume and BucketName
-          purgeKeys.add(deletedKey);
-          if (LOG.isDebugEnabled()) {
+      String deletedKeyGroup = result.getObjectKey();
+      PurgedKey purgedKey = purgedKeys.get(deletedKeyGroup);

Review Comment:
   purgedKeys blockGroup name is changed appended with "reclaimable count". Now 
deletedKeyGroup from scmClient is generally keyName, please check if this works



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