kaijchen commented on a change in pull request #3178:
URL: https://github.com/apache/ozone/pull/3178#discussion_r826559869



##########
File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCommitRequestWithFSO.java
##########
@@ -122,7 +121,7 @@ public OMClientResponse validateAndUpdateCache(OzoneManager 
ozoneManager,
       validateBucketAndVolume(omMetadataManager, volumeName, bucketName);
 
       String fileName = OzoneFSUtils.getFileName(keyName);
-      omBucketInfo = omMetadataManager.getBucketTable().get(bucketKey);
+      omBucketInfo = getBucketInfo(omMetadataManager, volumeName, bucketName);

Review comment:
       The cache is a `Map`. By getting omBucketInfo from cache, when we modify 
it later, we are also modifying the object in cache.




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