dpengpeng opened a new issue, #10727:
URL: https://github.com/apache/gravitino/issues/10727

   ### Version
   
   main branch
   
   ### Describe what's wrong
   
   The Gravitino frontend UI exposes a bug. I created a Metalake named 
metalake. Furthermore, I created catalog and schema instances within it. After 
I toggled the metalake switch off for the first time, it could not be turned 
back on; although the page displayed an enabled status upon clicking, 
refreshing the page reverted it to the disabled state, and attempting to view 
catalog details within the metalake triggered the following exception in the 
logs: 
   
   
   This scenario does not occur consistently but happens intermittently. 
Furthermore, this issue does not occur if the metalake contains no catalog or 
schema content.
   
   ### Error message and/or stacktrace
   
   ```
   WARN [Gravitino-webserver-66] 
[org.apache.gravitino.server.web.rest.ExceptionHandlers$CatalogExceptionHandler.handle(ExceptionHandlers.java:339)]
 - Failed to operate catalog(s) operation [LIST] under metalake [metalake], 
reason [Metalake metalake is not in use, please enable it first]
   org.apache.gravitino.exceptions.MetalakeNotInUseException: Metalake metalake 
is not in use, please enable it first
           at 
org.apache.gravitino.metalake.MetalakeManager.checkMetalake(MetalakeManager.java:103)
 ~[gravitino-core-1.0.0.jar:?]
           at 
org.apache.gravitino.catalog.CatalogManager.lambda$listCatalogsInfo$4(CatalogManager.java:367)
 ~[gravitino-core-1.0.0.jar:?]
           at 
org.apache.gravitino.lock.TreeLockUtils.doWithTreeLock(TreeLockUtils.java:49) 
~[gravitino-core-1.0.0.jar:?]
           at 
org.apache.gravitino.catalog.CatalogManager.listCatalogsInfo(CatalogManager.java:363)
 ~[gravitino-core-1.0.0.jar:?]
           at 
org.apache.gravitino.hook.CatalogHookDispatcher.listCatalogsInfo(CatalogHookDispatcher.java:66)
 ~[gravitino-core-1.0.0.jar:?]
           at 
org.apache.gravitino.catalog.CatalogNormalizeDispatcher.listCatalogsInfo(CatalogNormalizeDispatcher.java:67)
 ~[gravitino-core-1.0.0.jar:?]
           at 
org.apache.gravitino.listener.CatalogEventDispatcher.listCatalogsInfo(CatalogEventDispatcher.java:92)
 ~[gravitino-core-1.0.0.jar:?]
           at 
org.apache.gravitino.server.web.rest.CatalogOperations.lambda$listCatalogs$1(CatalogOperations.java:101)
 ~[gravitino-server-1.0.0.jar:?]
           at 
java.base/java.security.AccessController.doPrivileged(AccessController.java:714)
 ~[?:?]
           at java.base/javax.security.auth.Subject.doAs(Subject.java:525) 
~[?:?]
           at 
org.apache.gravitino.utils.PrincipalUtils.doAs(PrincipalUtils.java:44) 
~[gravitino-core-1.0.0.jar:?]
           at org.apache.gravitino.server.web.Utils.doAs(Utils.java:199) 
~[gravitino-server-common-1.0.0.jar:?]
           at 
org.apache.gravitino.server.web.rest.CatalogOperations.listCatalogs(CatalogOperations.java:95)
 ~[gravitino-server-1.0.0.jar:?]
           at 
java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
 ~[?:?]
           at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
   ```  
   
   ### How to reproduce
   
   <img width="1425" height="367" alt="Image" 
src="https://github.com/user-attachments/assets/46934483-e05d-485a-b26b-3dc51f535eb2";
 />
   
   <img width="1262" height="409" alt="Image" 
src="https://github.com/user-attachments/assets/85d46f57-0994-458b-8625-eb11276076cc";
 />
   
   ### Additional context
   
   _No response_


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