nevzheng opened a new issue, #12187:
URL: https://github.com/apache/gravitino/issues/12187

   ### Describe the proposal
   
   Gravitino already retains soft-deleted relational metadata until garbage 
collection, but users cannot discover or recover it through the public API.
   
   Add metadata-only undelete with consistent semantics across supported 
objects:
   
   - Discover tombstones using `GET <collection>?include=deleted`, optionally 
filtered by `name` or immutable `id`.
   - Read an exact tombstone using `GET <item>?include=deleted&id=<id>`, 
returning a strong ETag.
   - Recover it using conditional `PATCH <item>?include=deleted&id=<id>`, 
`If-Match`, and `{"deleted":false}`.
   - Recover only the most recent eligible same-name deletion generation.
   - Restore the exact recorded metadata deletion tree in one relational 
transaction.
   - Make exact retries idempotent when successful replay is provable.
   - Return typed failures for conflicts, expiry, stale ETags, and missing 
preconditions.
   - Initially authorize deleted reads and recovery through `SERVICE_ADMIN`.
   
   Supported roots include tables, functions, models, filesets, views, topics, 
schemas, catalogs, metalakes, policies, users, groups, roles, job templates, 
and tags.
   
   This epic is metadata-only. Recovery does not call connectors, identity 
providers, authorization plugins, executors, staging systems, or other 
downstream systems. Reconciliation with those systems remains future work 
because preserving downstream data is safer than attempting an unsafe 
reconstruction.
   
   Design proposal: **TBD**  
   POC pull request: **TBD**
   
   Out of scope for this epic:
   
   - Per-scope retention configuration
   - Explicit hard-purge API
   - Fine-grained recovery authorization
   - External-system reconciliation
   - Pagination
   - Python, CLI, UI, and MCP surfaces
   
   ### Task list
   
   - [ ] **TBD** — Harden relational upgrade testing and PostgreSQL GC safety
   - [ ] **TBD** — Define the conditional metadata-undelete API, DTOs, ETags, 
and errors
   - [ ] **TBD** — Persist deletion generations and add H2/MySQL/PostgreSQL 
migrations
   - [ ] **TBD** — Implement the generic recovery engine and table reference 
flow
   - [ ] **TBD** — Support catalog-scoped leaf objects
     - [ ] **TBD** — Function
     - [ ] **TBD** — Model
     - [ ] **TBD** — Fileset
     - [ ] **TBD** — View
     - [ ] **TBD** — Topic
   - [ ] **TBD** — Complete existing container-delete cascade semantics
   - [ ] **TBD** — Support exact container-tree recovery
     - [ ] **TBD** — Schema
     - [ ] **TBD** — Catalog
     - [ ] **TBD** — Metalake
   - [ ] **TBD** — Support metalake-scoped roots
     - [ ] **TBD** — Policy
     - [ ] **TBD** — User and group
     - [ ] **TBD** — Role
     - [ ] **TBD** — Job template
     - [ ] **TBD** — Tag
   - [ ] **TBD** — Add Java client support
   - [ ] **TBD** — Complete OpenAPI, documentation, concurrency tests, and 
migration validation
   


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