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

   ### What changes were proposed in this pull request?
   
   Persist `external=true` for registered Lance tables, including when the 
caller omits the flag or sets it to false. Normalize the properties before 
consulting a table location provider as well as in the Lance registration path.
   
   Use a shared ownership predicate for Lance drop/purge, generic location 
reclamation and Lance REST deregistration, so older registrations with 
missing/false stored flags also preserve data during ordinary removal. Document 
the distinction between drop/deregister and explicit purge.
   
   ### Why are the changes needed?
   
   A registration only stores catalog metadata, but the default managed 
classification currently allows ordinary drop to delete the existing dataset. 
Fixing new registrations alone would leave existing records and 
location-provider callbacks unsafe.
   
   Fix: #13931
   
   ### Does this PR introduce _any_ user-facing change?
   
   Registered Lance tables are external. Ordinary drop, registration overwrite 
of a historical registration, schema cascade and deregistration preserve the 
registered dataset. Explicit purge and Lance REST drop remain destructive. 
Historical stored properties are not automatically migrated, and non-Lance 
ownership rules are unchanged.
   
   ### How was this patch tested?
   
   - Ran Spotless for all three affected modules.
   - Ran `./gradlew :lance:lance-common:test 
:catalogs:catalog-lakehouse-generic:test :lance:lance-rest-server:test 
-PskipITs -PskipDockerTests=true`: 370 non-Docker tests passed, including 32 
added cases.
   - Tests create real local Lance datasets and verify data preservation 
through drop, legacy registration overwrite and schema cascade, as well as 
explicit purge deletion, provider reclamation and REST deregistration routing.
   - Reverted ownership normalization/protection temporarily: 14 of 23 selected 
regression cases failed as expected. Restored the fix and reran all three 
module suites successfully.
   - Docker and deployed client/server E2E tests were not 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]

Reply via email to