You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/06/17 07:07:16 UTC

[GitHub] [ozone] adoroszlai commented on a diff in pull request #3527: HDDS-6868. Add S3Auth information to thread local

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


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/protocolPB/OzoneManagerProtocolServerSideTranslatorPB.java:
##########
@@ -183,6 +183,9 @@ private OMResponse processRequest(OMRequest request) throws
           OzoneManagerRatisUtils.checkLeaderStatus(ozoneManager);
         }
         try {
+          if (request.hasS3Authentication()) {
+            ozoneManager.setS3Auth(request.getS3Authentication());
+          }

Review Comment:
   I think the same is missing for write case in `submitRequestDirectlyToOM`.
   
   Instead of repeating it in 4 places (read/write * ratis/non-ratis), wouldn't it be simpler to wrap the main flow of `processRequest` in a single `try-finally` to set/clear auth?



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org