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

   ## Version
   
   main branch
   
   ## Describe what's wrong
   
   When calling the GET owner API for a disabled metalake:
   
   `GET /api/metalakes/{metalake}/owners/metalake/{metalake}`
   
   the server returns `409 Conflict` with `MetalakeNotInUseException`, even 
though the metalake exists.
   
   A disabled metalake can still be loaded, so its owner information should 
also remain accessible. This exception should apply only to owner queries for 
child objects under the metalake and to mutation operations.
   
   ## Error message and/or stacktrace
   
   ```text
   HTTP 409 Conflict
   
   MetalakeNotInUseException:
   Metalake {metalake} is not in use, please enable it first
   ```
   
   The exception is triggered by `MetalakeManager.checkMetalakeInUse` in 
`OwnerOperations#getOwnerForObject`.
   
   ## How to reproduce
   
   1. Create a metalake.
   2. Disable the metalake.
   3. Verify that the metalake can still be loaded.
   4. Call `GET /api/metalakes/{metalake}/owners/metalake/{metalake}`.
   5. Observe the `409 Conflict` response.
   
   ## Additional context
   
   Only owner queries targeting the metalake itself should be allowed while it 
is disabled.
   
   Owner queries targeting catalogs or other child objects, along with owner 
mutation operations, should continue to require the metalake to be in use.
   


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