Copilot commented on code in PR #9563:
URL: https://github.com/apache/gravitino/pull/9563#discussion_r2646974889


##########
core/src/main/java/org/apache/gravitino/catalog/CatalogManager.java:
##########
@@ -602,7 +600,7 @@ public void disableCatalog(NameIdentifier ident) throws 
NoSuchCatalogException {
           checkMetalake(metalakeIdent, store);
 
           try {
-            if (!catalogInUse(store, ident)) {
+            if (getCatalogInUseValue(store, ident)) {

Review Comment:
   The negation operator is missing in this condition. The original code was 
`if (!catalogInUse(store, ident))`, which should now be `if 
(!getCatalogInUseValue(store, ident))`. Without the negation, the method will 
return early when the catalog IS in use, preventing it from being disabled. 
This is the opposite of the intended behavior - the catalog should only be 
disabled if it's currently in use.
   ```suggestion
               if (!getCatalogInUseValue(store, ident)) {
   ```



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

Reply via email to