sumitagrawl commented on code in PR #4021:
URL: https://github.com/apache/ozone/pull/4021#discussion_r1046667930


##########
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);

Review Comment:
   1. This Request is handled in Ratis Transaction which is synchronized flow, 
other write operation like create/delete bucket needs wait till this is 
completed.. So while this map is populated, parallel create or delete is not 
allowed in this flow. This is important for write operation to have consistent 
data.
   2. If bucket or volume is removed before this operation start, then 
bucketInfo will be null in this case and namespace/size quota will not be 
updated
   3. If other bucket is created, then here as fix, we are not updating to new 
bucketInfo.
   



-- 
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]

Reply via email to