jerqi commented on code in PR #6575:
URL: https://github.com/apache/gravitino/pull/6575#discussion_r1978537039
##########
core/src/main/java/org/apache/gravitino/hook/CatalogHookDispatcher.java:
##########
@@ -131,18 +131,18 @@ public boolean dropCatalog(NameIdentifier ident, boolean
force)
return false;
}
- // If we call the authorization plugin after dropping catalog, we can't
load the plugin of the
- // catalog
Catalog catalog = dispatcher.loadCatalog(ident);
- boolean dropped = dispatcher.dropCatalog(ident, force);
- if (dropped && catalog != null) {
+ if (catalog != null) {
List<String> locations =
AuthorizationUtils.getMetadataObjectLocation(ident,
Entity.EntityType.CATALOG);
AuthorizationUtils.removeCatalogPrivileges(catalog, locations);
}
- return dropped;
+ // We should call the authorization plugin before dropping the catalog,
because the dropping
+ // catalog
+ // will close the authorization plugin.
Review Comment:
Correct. Gradle format will cause this issue.
--
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]