chihsuan commented on code in PR #11216:
URL: https://github.com/apache/ozone/pull/11216#discussion_r3951365545


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMDirectoriesPurgeRequestWithFSO.java:
##########
@@ -269,6 +278,18 @@ public OMClientResponse 
validateAndUpdateCache(OzoneManager ozoneManager, Execut
         getBucketLayout(), volBucketInfoMap, fromSnapshotInfo, openKeyInfoMap);
   }
 
+  /**
+   * Return the copy this request accumulates deltas on, fetching it on first 
use. All three purge
+   * paths can touch the same bucket, so they must share one copy or earlier 
deltas are lost.
+   */
+  private OmBucketInfo accumulatedBucketInfo(Map<Pair<String, String>, 
OmBucketInfo> volBucketInfoMap,
+      OMMetadataManager omMetadataManager, String volumeName, String 
bucketName) {
+    OmBucketInfo omBucketInfo = volBucketInfoMap.get(Pair.of(volumeName, 
bucketName));
+
+    return omBucketInfo != null ? omBucketInfo
+        : getBucketInfoForUpdate(omMetadataManager, volumeName, bucketName);

Review Comment:
   All three callers already store the copy in the map. No deltas are lost.



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