ivandika3 commented on code in PR #11707:
URL: https://github.com/apache/ozone/pull/11707#discussion_r4369321096
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java:
##########
@@ -754,8 +750,9 @@ private UserGroupInformation getRealUserInfo() {
// After HDDS-5881 the user will not be different,
// as S3G uses single RpcClient. So we should be checking thread-local
// S3Auth and use it during proxy.
- if (ozoneManagerClient.getThreadLocalS3Auth() != null) {
- return s3gUgi;
+ S3Auth s3Auth = ozoneManagerClient.getThreadLocalS3Auth();
+ if (s3Auth != null) {
+ return UserGroupInformation.createRemoteUser(s3Auth.getUserPrincipal());
Review Comment:
> I think the change that addressed
https://github.com/apache/ozone/pull/4188#discussion_r1550036354 is actually
the cause of this bug. It uses a single s3gUgi field for all threads that use
the RpcClient, so one user’s request can overwrite the owner of another user’s
key.
Yes, I agreed that this is the root cause.
My thought is to have S3Auth contains the UGI instead of having an attribute
of the UGI. However, you're right that the UGI is only needed for some cases
and each AFAIK each S3G thread only calls `getRealUserInfo` at most once.
--
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]