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


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyCommitRequest.java:
##########
@@ -105,7 +105,8 @@ public OMRequest preExecute(OzoneManager ozoneManager) 
throws IOException {
 
     return getOmRequest().toBuilder()
         .setCommitKeyRequest(commitKeyRequest.toBuilder()
-            .setKeyArgs(newKeyArgs)).setUserInfo(getUserInfo()).build();
+            .setKeyArgs(newKeyArgs))
+        .setUserInfo(getUserIfNotExists(ozoneManager)).build();

Review Comment:
   The same `setUserInfo(getUserIfNotExists` logic is performed in 
`OMClientRequest#preExecute` (the base method in parent class).
   
   
https://github.com/apache/ozone/blob/40e6875a7e6b5be1d6bf617a441e1c9aab1eb72b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/OMClientRequest.java#L98-L107
   
   I wonder if `OMKeyCommitRequest` should call the parent method first thing, 
like some other requests:
   
   
https://github.com/apache/ozone/blob/40e6875a7e6b5be1d6bf617a441e1c9aab1eb72b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/security/OMGetDelegationTokenRequest.java#L64-L67



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