You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "devabhishekpal (via GitHub)" <gi...@apache.org> on 2024/09/25 07:30:31 UTC

[PR] HDDS 11472. Return single instance of Access Authorizer for OM [ozone]

devabhishekpal opened a new pull request, #7238:
URL: https://github.com/apache/ozone/pull/7238

   ## What changes were proposed in this pull request?
   
   HDDS 11472. Return single instance of Access Authorizer for OM
   
   Please describe your PR in detail:
   * Currently when we instantiate OM we request an instance of AccessAuthorizer from OzoneAuthorizerFactory
   * This may cause previous instances of AccessAuthorizer to not be cleared on subsequent calls.
   * As a part of this PR we are checking if an instance of AccessAuthorizer is already present in the Factory and returning that, else we initialize with new value
   * This will ensure we do not un-necessarily create new authorizer objects.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-11472
   
   ## How was this patch tested?
   Patch was tested via Unit tests


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


Re: [PR] HDDS-11472. Return single instance of Access Authorizer for OM [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #7238:
URL: https://github.com/apache/ozone/pull/7238#issuecomment-2376121606

   Thanks @fapifta for catching this.
   
   > * change OzoneAccessAuthorizer to be a native authorizer, this may have some interesting consequences that I do not see, but in general it seems to be ok
   
   I vote for this option.  `OzoneAccessAuthorizer` is just a no-op (allows everything) and is native to Ozone (vs. being external).
   
   > * revisit the restart method
   
   We should do this in a follow-up.  `restart` is only used in tests.  I think such custom logic in tests reduces their ability to catch real bugs, and introduces test-only problems like this.


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


Re: [PR] HDDS 11472. Return single instance of Access Authorizer for OM [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #7238:
URL: https://github.com/apache/ozone/pull/7238#issuecomment-2374421924

   On second thought, it may be better to handle this in `OzoneManager#instantiateServices` like this:
   
   ```java
   if (accessAuthorizer == null || accessAuthorizer.isNative()) {
     accessAuthorizer = OzoneAuthorizerFactory.forOM(this);
   }
   ```


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


Re: [PR] HDDS-11472. Return single instance of Access Authorizer for OM [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #7238:
URL: https://github.com/apache/ozone/pull/7238#issuecomment-2378680717

   @fapifta can you please take another look?


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