aryangupta1998 commented on code in PR #9270:
URL: https://github.com/apache/ozone/pull/9270#discussion_r2509084058
##########
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:
logic isn't changed un-necessarily, remainNum > 0 logic was there before the
introduction of DeleteKeyResult class and actually it's simple, that if
remainNum is greater than 0 it means that all sub dirs and all sub files of the
parent dir has been processed successfully. We don't need to use
`subDirDeleteResult.isProcessedKeys() &&
subFileDeleteResult.isProcessedKeys()`
--
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]