jerryshao opened a new issue, #15114: URL: https://github.com/apache/gravitino/issues/15114
### What would you like to be improved? A published domain can be deleted directly today. `DomainManager.deleteDomain` only rejects a domain that has sub-domains and does not check its status. This lets a domain that consumers already rely on disappear in one step, and it is inconsistent with the other status rules: a sub-domain can only be published under a published parent, and a domain with published sub-domains cannot be unpublished. ### How should we improve? Allow deleting only draft domains. Deleting a published domain fails with `IllegalArgumentException` (HTTP 400), the same as the other status rules, asking the caller to unpublish it first. Check the status in the same row lock as the existing sub-domain check, before it, so a published domain with sub-domains reports the status error. Enforce it on the server so the REST API, Java/Python clients and every other caller behave the same, and update the Javadoc, OpenAPI spec and user docs. -- 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]
