aryangupta1998 commented on code in PR #9270:
URL: https://github.com/apache/ozone/pull/9270#discussion_r2513147866
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java:
##########
@@ -421,11 +428,14 @@ 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 && subDirDeleteResult.isProcessedKeys() &&
subFileDeleteResult.isProcessedKeys() ? delDirName : null;
if (purgeDeletedDir == null && subFiles.isEmpty() && subDirs.isEmpty()) {
return Optional.empty();
}
+ if (purgeDeletedDir != null) {
+ remainNum.addAndGet(-1);
Review Comment:
At other places I'm using `remainNum.addAndGet(-subDirs.size()); and
remainNum.addAndGet(-subFiles.size());`, so for consistency I used
`remainNum.addAndGet(-1);`
--
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]