swamirishi commented on code in PR #9270:
URL: https://github.com/apache/ozone/pull/9270#discussion_r2514247324
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/DirectoryDeletingService.java:
##########
@@ -618,12 +668,12 @@ private boolean processDeletedDirectories(SnapshotInfo
currentSnapshotInfo, KeyM
long dirNum = 0L;
long subDirNum = 0L;
long subFileNum = 0L;
- int consumedSize = 0;
List<PurgePathRequest> purgePathRequestList = new ArrayList<>();
Map<VolumeBucketId, BucketNameInfo> bucketNameInfos = new HashMap<>();
+ AtomicInteger remainNum = new AtomicInteger(remaining);
Review Comment:
AtomicInteger because we wanted a call by reference model where this value
would be updated inside the function. The function prepare DeleteRequest
updates both remainNum and also returns PurgePathRequest. We would have to
update by returning a pair which might make it messy unnecessarily.
--
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]