You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "roryqi (via GitHub)" <gi...@apache.org> on 2026/06/03 07:14:33 UTC
[PR] [#11363] feat(iceberg-rest): wire async cleanup into the REST drop flow (#11364) [gravitino]
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [cherry-pick to branch 1.3][#11363] feat(iceberg-rest): wire async cleanup into the REST drop flow (#11364) [gravitino]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #11398:
URL: https://github.com/apache/gravitino/pull/11398#issuecomment-4610582125
<!-- coverage-report -->
### Code Coverage Report
|Overall Project|66.82% **`-0.13%`**|:green_circle:|
|:-|:-|:-:|
|Files changed|47.16%|:red_circle:|
<br>
|Module|Coverage||
|:-|:-|:-:|
|aliyun|1.72%|:red_circle:|
|api|46.82%|:green_circle:|
|authorization-common|85.96%|:green_circle:|
|aws|3.66% **`-0.58%`**|:red_circle:|
|azure|2.47%|:red_circle:|
|catalog-common|10.04%|:red_circle:|
|catalog-fileset|80.33%|:green_circle:|
|catalog-glue|66.08%|:green_circle:|
|catalog-hive|79.55%|:green_circle:|
|catalog-jdbc-clickhouse|80.02%|:green_circle:|
|catalog-jdbc-common|45.31%|:green_circle:|
|catalog-jdbc-doris|80.28%|:green_circle:|
|catalog-jdbc-hologres|54.03%|:green_circle:|
|catalog-jdbc-mysql|79.23%|:green_circle:|
|catalog-jdbc-oceanbase|78.38%|:green_circle:|
|catalog-jdbc-postgresql|82.29%|:green_circle:|
|catalog-jdbc-starrocks|78.51%|:green_circle:|
|catalog-kafka|77.01%|:green_circle:|
|catalog-lakehouse-generic|44.89%|:green_circle:|
|catalog-lakehouse-hudi|79.1%|:green_circle:|
|catalog-lakehouse-iceberg|85.74%|:green_circle:|
|catalog-lakehouse-paimon|79.29%|:green_circle:|
|catalog-model|77.72%|:green_circle:|
|cli|44.51%|:green_circle:|
|client-java|77.91%|:green_circle:|
|common|49.99%|:green_circle:|
|core|82.49%|:green_circle:|
|filesystem-hadoop3|76.97%|:green_circle:|
|flink|0.0%|:red_circle:|
|flink-common|41.2%|:green_circle:|
|flink-runtime|0.0%|:red_circle:|
|gcp|14.12%|:red_circle:|
|hadoop-common|10.39%|:red_circle:|
|hive-metastore-common|53.26%|:green_circle:|
|iceberg-common|56.54% **`-6.31%`**|:green_circle:|
|iceberg-rest-server|72.76% **`-0.7%`**|:green_circle:|
|idp-basic|85.99%|:green_circle:|
|integration-test-common|0.0%|:red_circle:|
|jobs|66.17%|:green_circle:|
|lance-common|20.83%|:red_circle:|
|lance-rest-server|60.27%|:green_circle:|
|lineage|53.02%|:green_circle:|
|optimizer|82.95%|:green_circle:|
|optimizer-api|21.95%|:red_circle:|
|server|85.73%|:green_circle:|
|server-common|73.13%|:green_circle:|
|spark|32.79%|:red_circle:|
|spark-common|39.75%|:red_circle:|
|trino-connector|39.44%|:red_circle:|
<details>
<summary>Files</summary>
|Module|File|Coverage||
|:-|:-|:-|:-:|
|aws|[S3FileSystemProvider.java](https://github.com/qqqttt123/gravitino/blob/24a867a794e77bce505649eb7e7078b054f63e52/bundles/aws/src/main/java/org/apache/gravitino/s3/fs/S3FileSystemProvider.java)|0.0%|:red_circle:|
|iceberg-common|[IcebergCatalogWrapper.java](https://github.com/qqqttt123/gravitino/blob/24a867a794e77bce505649eb7e7078b054f63e52/iceberg/iceberg-common/src/main/java/org/apache/gravitino/iceberg/common/ops/IcebergCatalogWrapper.java)|29.15%|:red_circle:|
|iceberg-rest-server|[IcebergCleanupMapperPackageProvider.java](https://github.com/qqqttt123/gravitino/blob/24a867a794e77bce505649eb7e7078b054f63e52/iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/service/cleanup/mapper/provider/IcebergCleanupMapperPackageProvider.java)|100.0%|:green_circle:|
||[IcebergCleanupHelper.java](https://github.com/qqqttt123/gravitino/blob/24a867a794e77bce505649eb7e7078b054f63e52/iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/service/dispatcher/IcebergCleanupHelper.java)|100.0%|:green_circle:|
||[IcebergNamespaceOperationExecutor.java](https://github.com/qqqttt123/gravitino/blob/24a867a794e77bce505649eb7e7078b054f63e52/iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/service/dispatcher/IcebergNamespaceOperationExecutor.java)|100.0%|:green_circle:|
||[IcebergTableOperationExecutor.java](https://github.com/qqqttt123/gravitino/blob/24a867a794e77bce505649eb7e7078b054f63e52/iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/service/dispatcher/IcebergTableOperationExecutor.java)|100.0%|:green_circle:|
||[IcebergCleanupJobStore.java](https://github.com/qqqttt123/gravitino/blob/24a867a794e77bce505649eb7e7078b054f63e52/iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/service/cleanup/IcebergCleanupJobStore.java)|94.44%|:green_circle:|
||[IcebergRequestContext.java](https://github.com/qqqttt123/gravitino/blob/24a867a794e77bce505649eb7e7078b054f63e52/iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/listener/api/event/IcebergRequestContext.java)|80.0%|:green_circle:|
||[RESTService.java](https://github.com/qqqttt123/gravitino/blob/24a867a794e77bce505649eb7e7078b054f63e52/iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/RESTService.java)|0.0%|:red_circle:|
</details>
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [cherry-pick to branch 1.3][#11363] feat(iceberg-rest): wire async cleanup into the REST drop flow (#11364) [gravitino]
Posted by "roryqi (via GitHub)" <gi...@apache.org>.
roryqi closed pull request #11398: [cherry-pick to branch 1.3][#11363] feat(iceberg-rest): wire async cleanup into the REST drop flow (#11364)
URL: https://github.com/apache/gravitino/pull/11398
--
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: commits-unsubscribe@gravitino.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org