Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDDS-11472. Avoid recreating external access authorizer on OM state reload #7238

Merged
merged 6 commits into from
Sep 30, 2024
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,13 @@ private void instantiateServices(boolean withNewSnapshot) throws IOException {
prefixManager = new PrefixManagerImpl(this, metadataManager, isRatisEnabled);
keyManager = new KeyManagerImpl(this, scmClient, configuration,
perfMetrics);
accessAuthorizer = OzoneAuthorizerFactory.forOM(this);
// If authorizer is not initialized or the authorizer is Native
// re-initialize the authorizer, else for non-native authorizer
// like ranger we can reuse previous value if it is initialized
if (null == accessAuthorizer || accessAuthorizer.isNative()) {
accessAuthorizer = OzoneAuthorizerFactory.forOM(this);
}

omMetadataReader = new OmMetadataReader(keyManager, prefixManager,
this, LOG, AUDIT, metrics, accessAuthorizer);
// Active DB's OmMetadataReader instance does not need to be reference
Expand Down
Loading