yuqi1129 opened a new pull request, #14285:
URL: https://github.com/apache/gravitino/pull/14285

   ### What changes were proposed in this pull request?
   
   `MetalakeMetaService.deleteMetalake` now cleans securable objects and tag 
relations before the roles and tags they hang off, on both the cascade and the 
non-cascade path. The non-cascade path also soft-deletes policies and policy 
versions.
   
   ### Why are the changes needed?
   
   Both cleanup statements find their rows through a live role or tag, so 
running them after the roles and tags were soft-deleted updated nothing. The 
rows of a dropped metalake stayed live and were never collected, and so did its 
policies after a non-cascade drop.
   
   Fixes #14282
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   New `TestMetalakeMetaService.testDeleteMetalakeRemovesGovernanceRows` 
(cascade and non-cascade), which fails without the fix. 
`TestMetalakeMetaService` and `TestMetalakeManager` pass on H2; MySQL and 
PostgreSQL run in CI.
   


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