adoroszlai commented on code in PR #6220:
URL: https://github.com/apache/ozone/pull/6220#discussion_r1489840579


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeySetTimesRequest.java:
##########
@@ -63,9 +64,10 @@ public OMRequest preExecute(OzoneManager ozoneManager) 
throws IOException {
     OMRequest request = super.preExecute(ozoneManager);
     SetTimesRequest setTimesRequest = request.getSetTimesRequest();
     String keyPath = setTimesRequest.getKeyArgs().getKeyName();
+    OmBucketInfo bucketInfo = ozoneManager.getBucketInfo(volumeName, 
bucketName);
     String normalizedKeyPath =
         validateAndNormalizeKey(ozoneManager.getEnableFileSystemPaths(),
-            keyPath, getBucketLayout());
+            keyPath, bucketInfo.getBucketLayout());

Review Comment:
   What is the reason for this part of the change?
   
   The original `getBucketLayout()` returns the layout of the actual bucket 
(following any links), and is initialized already, so usage does not need extra 
lookup.
   
   I ran all subclasses of `AbstractRootedOzoneFileSystemTest`, both layouts 
were the same in all cases (`getBucketLayout()` and 
`bucketInfo.getBucketLayout()`).  So we I don't think we need the extra 
`getBucketInfo()` lookup.



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