nevzheng commented on code in PR #12257: URL: https://github.com/apache/gravitino/pull/12257#discussion_r3686021118
########## design-docs/iceberg-table-soft-deletion.md: ########## @@ -0,0 +1,479 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +# Design: Soft Deletion for Iceberg Tables + +| Field | Value | +| ------- | ----------------------------------------------------------------------------------- | +| Status | Draft — for discussion | +| Author | Nevin Zheng | +| Created | 2026-07-29 | +| Module | `core`, `server`, `iceberg/iceberg-rest-server` | +| Related | [Asynchronous Hard Deletion](./async-iceberg-rest-hard-deletion.md) (§3 Non-Goal 1) | + +**Scope.** The deletion record, the metadata model, and the API for discovering and +undeleting a dropped Iceberg table, and the purge that runs when the window closes. +Purge reuses the shipped cleanup worker; its scheduling and operator tooling are +deferred (§5.6). Existing drop and purge behavior is unchanged. + +--- + +## 1. Background + +Dropping an Iceberg table is terminal — no window exists in which a mistaken drop +can be undone. + +| Request | What happens | Recoverable | +| --------------------------------------------- | --------------------------------------------- | ----------- | +| `DELETE …` (no purge) | Registration removed; data files orphaned | No | +| `DELETE …?purgeRequested=true` (synchronous) | Files deleted on the request thread | No | +| `DELETE …?purgeRequested=true` (asynchronous) | A cleanup job deletes files in the background | No | + Review Comment: if you're talking about adding a sync=True or async=true, I'd rather not because that adds complexity. I recommend defaulting to asynchronous w/ immediate expiry. and relying on one system. -- 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]
