sumitagrawl commented on code in PR #4021:
URL: https://github.com/apache/ozone/pull/4021#discussion_r1047956248
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMDirectoriesPurgeRequestWithFSO.java:
##########
@@ -75,12 +75,13 @@ public OMClientResponse validateAndUpdateCache(OzoneManager
ozoneManager,
volumeName, bucketName);
lockSet.add(volBucketPair);
}
- OmBucketInfo omBucketInfo = getBucketInfo(omMetadataManager,
- volumeName, bucketName);
+ updateBucketInfo(volBucketInfoMap, omMetadataManager, path,
+ volumeName, bucketName, volBucketPair);
+ OmBucketInfo omBucketInfo = volBucketInfoMap.get(volBucketPair);
// bucketInfo can be null in case of delete volume or bucket
+ // or key does not belong to bucket as bucket is recreated
if (null != omBucketInfo) {
omBucketInfo.incrUsedNamespace(-1L);
- volBucketInfoMap.putIfAbsent(volBucketPair, omBucketInfo);
}
}
Review Comment:
updateBucketInfo is choosen to avoid look for omBucketInfo again and again,
as there can be 10,000 elements to check. Please check if this can have some
issue.
@neils-dev
--
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]