roryqi opened a new pull request, #12849:
URL: https://github.com/apache/gravitino/pull/12849
### What changes were proposed in this pull request?
Allow getting the owner of a disabled metalake.
The metalake in-use check is skipped only when the target metadata object is
the metalake itself. Owner queries for child objects and owner mutation
operations continue to require the metalake to be in use.
Add regression coverage for both cases:
- Getting the owner of a disabled metalake returns 200.
- Getting the owner of a child object under a disabled metalake returns 409.
### Why are the changes needed?
A disabled metalake can still be loaded, but its owner could not be
retrieved because the GET owner endpoint unconditionally required the metalake
to be in use.
Fix: #12848
### Does this PR introduce _any_ user-facing change?
Yes. `GET /api/metalakes/{metalake}/owners/metalake/{metalake}` now returns
the owner for an existing disabled metalake instead of returning
`MetalakeNotInUseException`.
Owner queries for child objects and owner mutation operations remain
unchanged.
### How was this patch tested?
- `./gradlew :server:test --tests
org.apache.gravitino.server.web.rest.TestOwnerOperations`
- `./gradlew :server:spotlessApply`
- `git diff --check`
--
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]