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


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyPurgeRequest.java:
##########
@@ -223,7 +223,9 @@ private List<OmBucketInfo> 
updateBucketSize(List<BucketPurgeKeysSize> bucketPurg
       }
       return bucketInfoList;
     } finally {
-      
mergeOmLockDetails(omMetadataManager.getLock().releaseWriteLocks(BUCKET_LOCK, 
bucketKeyList));
+      if (acquiredLock) {

Review Comment:
   this is not required as its checked above only if acquiredLock is false and 
return there only. This is redundant check.



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMDirectoriesPurgeRequestWithFSO.java:
##########
@@ -254,7 +255,9 @@ public OMClientResponse validateAndUpdateCache(OzoneManager 
ozoneManager, Execut
           volBucketInfoMap.entrySet()) {
         entry.setValue(entry.getValue().copyObject());
       }
-      omMetadataManager.getLock().releaseWriteLocks(BUCKET_LOCK, 
bucketLockKeys);

Review Comment:
   the check is already there at top, so this is double check, this is not 
required.



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