yuqi1129 opened a new pull request, #14870: URL: https://github.com/apache/gravitino/pull/14870
### What changes were proposed in this pull request? Add the catalog-only `lance.allow-external-table-purge` property, defaulting to `false`. Reject external or registered Lance table purges before removing metadata or deleting files, including Lance REST drop and create-overwrite of an existing external table. Table properties cannot enable the policy. ### Why are the changes needed? A caller can own a table registered at another table's location, or created at a parent directory containing other datasets. Table ownership alone does not authorize deleting that data. This provides a default deletion guard; location ownership and storage authorization remain follow-up work in #14788. Refs #13696, #14788. ### Does this PR introduce _any_ user-facing change? Yes. External purge is disabled by default; Lance REST returns HTTP 406. Catalog administrators must explicitly opt in to retain destructive drop/overwrite behavior. The opt-in does not validate location ownership. Metadata-only drop/deregister and managed-table deletion remain unchanged. ### How was this patch tested? - 201 focused unit tests and 48 embedded integration tests passed, covering policy defaults, table-property bypass attempts, legacy registrations, overwrite, provider callbacks, and catalog opt-in. - Two authenticated cross-user HTTP regression cases reproduce #13696. Both fail with HTTP 200 when the guard is removed and pass with HTTP 406 while preserving readable victim datasets when restored. - Scoped Spotless checks and `git diff --check` passed. No Docker or remote object-store tests were run. -- 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]
