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


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java:
##########
@@ -421,11 +429,13 @@ private Optional<PurgePathRequest> 
prepareDeleteDirRequest(
 
     // step-3: If both sub-dirs and sub-files are exhausted under a parent
     // directory, only then delete the parent.
-    String purgeDeletedDir = purgeDir && subDirDeleteResult.isProcessedKeys() 
&&
-        subFileDeleteResult.isProcessedKeys() ? delDirName :  null;
+    String purgeDeletedDir = purgeDir && remainNum.get() > 0 ? delDirName :  
null;

Review Comment:
   Interface wise the keeping a flag is much more cleaner than the background 
service having to guess if this can be reclaimed or not



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