yuqi1129 opened a new pull request, #14317: URL: https://github.com/apache/gravitino/pull/14317
### What changes were proposed in this pull request? Pass `force` to the metalake store delete so non-forced drops use the existing transactional emptiness check. Translate a store-level non-empty rejection to `NonEmptyMetalakeException`, preserving its cause and the existing REST error contract. Add manager-level regression coverage for a catalog committed after the initial empty listing, existing catalogs, and repeated deletion of an empty metalake, plus REST error coverage. ### Why are the changes needed? Another server can create a catalog between the manager's empty listing and deletion. The unconditional cascade flag previously allowed a non-forced request to delete that catalog. The non-cascade store path locks the metalake row and rolls back when catalogs exist. Part of #13853. This PR addresses only the non-forced metalake drop task; the epic remains open. ### Does this PR introduce _any_ user-facing change? A non-forced drop refuses to delete a metalake when a catalog appears after the initial check, using the existing non-empty conflict response. Forced drops retain their existing behavior. No API, configuration, or schema changes. ### How was this patch tested? - 68 targeted tests passed, including the new manager cases on H2, MySQL 8 and PostgreSQL 13, existing metalake manager/dispatcher/event tests, H2 metalake persistence tests, and REST tests. - Spotless checks passed. No unfiltered core suite was run. - Reverting only the cascade flag makes the new H2 race test fail; restoring the committed code passes all three manager H2 cases again. - A fresh-context review found no Blocker or Important issue. -- 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]
