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

   ### What changes were proposed in this pull request?
   
   Final PR (3 of 3) of async hard deletion — wires the cleanup engine (#11298) 
into the REST path:
   
   - `IcebergTableOperationExecutor.dropTable` branches on the 
`X-Gravitino-Async-Purge` header: synchronous purge by default; when `true` in 
auxiliary mode it snapshots the table metadata location, drops the catalog 
entry, and enqueues an `IcebergCleanupJob` (keyed by catalog id) instead of 
deleting files inline.
   - Name-reuse tombstone: `createTable`/`registerTable` return `409` while an 
active cleanup job occupies the identifier (best-effort — skipped when no 
Gravitino catalog entity backs the name).
   - Adds 
`IcebergCatalogWrapper.loadTableMetadata/fileIOImpl/fileIOProperties`, 
`IcebergRequestContext.asyncPurge()`, and `IcebergCleanupManager` lifecycle 
wiring in `RESTService`.
   - Documents the async semantics, the `X-Gravitino-Async-Purge` header, and 
the `async-cleanup.*` config.
   
   ### Why are the changes needed?
   
   The async cleanup engine (#11298) is unused until the REST drop path opts 
requests into it.
   
   Fix: #11363
   
   ### Does this PR introduce _any_ user-facing change?
   
   - New opt-in request header `X-Gravitino-Async-Purge: true` on `DELETE 
...?purgeRequested=true`.
   - New `gravitino.iceberg-rest.async-cleanup.*` configuration keys 
(documented).
   - `createTable`/`registerTable` return `409 Conflict` while a cleanup job is 
active for the identifier.
   
   ### How was this patch tested?
   
   - Unit: `TestIcebergTableOperationExecutorAsyncPurge`, 
`TestIcebergPurgeTombstone`, `TestIcebergRequestContext`; full 
`:iceberg:iceberg-rest-server` unit suite green.
   - Integration: `IcebergRESTAsyncPurgeIT` (Gravitino server + Iceberg REST 
aux service, PostgreSQL-backed catalog via the dynamic provider) — verifies the 
async drop enqueues a cleanup job, the `409` tombstone blocks recreate while in 
flight, and a background worker deletes the table's files.


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