yuqi1129 opened a new pull request, #13298: URL: https://github.com/apache/gravitino/pull/13298
### What changes were proposed in this pull request? Backport to `branch-1.3` of the catalog-drop part of #12420 plus the regression test from #13297: - `MetalakeManager.dropMetalake(force=true)` now force-drops each child catalog through `CatalogManager.dropCatalog` before deleting the metalake entity, so every catalog is evicted from the catalog cache and closed on the same path as an individual catalog drop. A disabled metalake is briefly re-enabled first because `dropCatalog` requires `metalake-in-use=true`. - `MetalakeManager` gains a constructor taking `CatalogManager`; `GravitinoEnv` creates `CatalogManager` before `MetalakeManager` and passes it in. The 2-arg constructor is kept. - Tests: `testForceDropMetalakeClosesCachedCatalogs` (real `CatalogManager`, fails without the fix) and `testForceDropMetalakeAfterDisableDropsLeftoverCatalogs` (disable then force-drop). The rest of #12420 (secrets) is not backported. ### Why are the changes needed? On `branch-1.3`, dropping a metalake only deletes the metalake entity; the cached catalog instances and their connection pools stay alive until cache expiry or server restart. Fix: #13296 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? `TestMetalakeManager` (8/8), `TestCatalogManager` (27/27), `TestMetalakeNormalizeDispatcher` locally on `branch-1.3`. -- 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]
