jerryshao commented on code in PR #9563:
URL: https://github.com/apache/gravitino/pull/9563#discussion_r2647473111
##########
core/src/main/java/org/apache/gravitino/catalog/CatalogManager.java:
##########
@@ -562,7 +560,7 @@ public void enableCatalog(NameIdentifier ident)
checkMetalake(metalakeIdent, store);
try {
- if (catalogInUse(store, ident)) {
+ if (getCatalogInUseValue(store, ident)) {
Review Comment:
> Also, checking the catalog needs to load and wrap the catalog entity, and
the load/alter also do the same thing, it relies on the cache to avoid
accessing the DB twice, but my feeling is that this can be optimized.
Unfortunately, `getCatalogInUseValue` doesn't put the catalog object into
cache after getting from the store, which means that the follow-up load will
access the entity store again. I think we have rooms to improve.
--
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]