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


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/response/key/OMDirectoriesPurgeResponseWithFSO.java:
##########
@@ -147,22 +148,22 @@ public void processPaths(
         
deletedSpaceOmMetadataManager.getDeletedDirTable().putWithBatch(deletedSpaceBatchOperation,
             ozoneDeleteKey, keyInfo);
 
-        
keySpaceOmMetadataManager.getDirectoryTable().deleteWithBatch(keySpaceBatchOperation,
-            ozoneDbKey);
-
         if (LOG.isDebugEnabled()) {
           LOG.debug("markDeletedDirList KeyName: {}, DBKey: {}",
               keyInfo.getKeyName(), ozoneDbKey);
         }
       }
 
+      for (HddsProtos.KeyValue keyRanges : path.getDeleteRangeSubDirsList()) {
+        keySpaceOmMetadataManager.getDirectoryTable()
+            .deleteRangeWithBatch(keySpaceBatchOperation, keyRanges.getKey(), 
keyRanges.getValue());

Review Comment:
   for dir1 (volumeid=1, bucketid=2,objectid=5), need delete all sub-dir in 
range, its format will be,
   `/1/2/5/<all dirs>`. Since dir1 is marked for deletion, prefix /1/2/5/ will 
have same ordering with filter. Other will not have same index.
   
   So, `/1/2/5/`abc --> `/1/2/5/`zzz can not have any other entry from other 
directory. 
   
   Still **can not think** if any pattern of sub-dir name can result in 
deletion of some other sub-dir outside the range or boundary case. Same will 
apply to files also.
   
   



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