anuragp010 commented on code in PR #11291:
URL: https://github.com/apache/ozone/pull/11291#discussion_r4143348639
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java:
##########
@@ -335,7 +336,8 @@ void optimizeDirDeletesAndSubmitRequest(
// Optimization to handle delete sub-dir and keys to remove quickly
// This case will be useful to handle when depth of directory is high
- int subdirDelNum = 0;
+ // Bucket grouping can submit recursive requests before some of the
initial requests.
+ Set<PurgePathRequest> initialRequests = new
HashSet<>(purgePathRequestList);
Review Comment:
Since `HashSet` is used here, will we be traversing all the elements of
`deletedSubFiles` and `markDeletedSubDirs` in every `PurgePathRequest` during
this initialisation?
And since we're returning the requests passed to
`submitPurgePathsWithBatching` as is without modification, would it better to
use a `Set` created from an
[`IdentityHashMap`](https://docs.oracle.com/javase/8/docs/api/java/util/IdentityHashMap.html)?
--
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]