hemantk-12 commented on code in PR #5119:
URL: https://github.com/apache/ozone/pull/5119#discussion_r1275468691


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeySetTimesRequestWithFSO.java:
##########
@@ -96,6 +97,8 @@ public OMClientResponse validateAndUpdateCache(OzoneManager 
ozoneManager,
         throw new OMException("Key not found. Key:" + key, KEY_NOT_FOUND);
       }
       omKeyInfo = keyStatus.getKeyInfo();
+      // HDDS-setting Key name back to Ozone Key before updating cache value.
+      omKeyInfo.setKeyName(OzoneFSUtils.getFileName(key));

Review Comment:
   > Adding a Helper function might not be helpful for other devs, having a 
unit test will have a failed CI.
   
   If `OMFileRequest` is supposed to be use to access tables, then I think it 
is better to do that way. Otherwise as @jojochuang  said, we should remove 
`keyName` update from `OMFileRequest.getOMKeyInfoIfExists()`.
   
   In the end, I think we need to revisit the access of `keyTable` (may be 
`fileTable` and `dirTable` as well). It is supposed to through `OMFileRequest`, 
it should be used for both read and write.



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