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


##########
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:
   This may cause unexpected key deletion also,
   1. while iterating as it works over db snapshot, we selected a range to 
delete, let k5-k9
   2. But later k666 gets added in middle which was not in range iterator 
earlier
   3. So during purge, it can delete it other item also, as delete range in 
based on lexographical ordered.
   So it may not be feasible to have this.



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