[Server] Force delete of a schema or catalog leaves its uncommitted staging tables behind
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start with SchemaRepository.deleteSchema, which has no step for StagingTableDAO, and compare it with the force-delete steps for tables and volumes. Then read the overlap check and STORAGE_USER_TYPES in ExternalLocationUtils to see which orphaned-row logic can be dropped. Done means a force delete of a catalog or schema removes its uncommitted uc_staging_tables rows, and a test confirms the row is gone.
由索引模型根据 Issue 内容生成。
描述
Describe the bug
Deleting a schema or catalog with force=true removes its tables, volumes, functions and models, but not its uncommitted staging tables. SchemaRepository.deleteSchema has no step for StagingTableDAO, and no other code path deletes those rows, so a staging table that is never committed stays in the database for good. The Delta API also has no call to delete a staging table.
ExternalLocationUtils already works around this. The overlap check for a new path still looks at uncommitted staging tables to cover "orphaned uncommited staging tables remaining after the catalog/schema is gone", and STORAGE_USER_TYPES leaves them out because "orphaned staging rows are never removed and would keep the location in use forever".
To Reproduce
- Create a catalog with a local
storage_rootand a schema in it. - Create a staging table with the Delta API (
POST /v1/catalogs/{catalog}/schemas/{schema}/staging-tables) and do not commit it. - Delete the catalog with
force=true. - The
uc_staging_tablesrow for that staging table is still there. Itsstaging_locationis still counted by the overlap check inExternalLocationUtils.
Expected behavior
A force delete of a schema or catalog also removes its uncommitted staging tables, or there is some other way to clean them up, so the overlap check no longer needs to cover orphaned rows.
Additional context
Found while writing a test for #2342, which leaves one staging table behind in a catalog with a random name after cleanup.
- 主要语言
- Java
- 星标
- 3.6k
- 派生
- 706
- 平均合并
- 3 天 5 小时
- 30 天内合并 PR
- 135
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
unitycatalog/unitycatalog 的其他 Issue
-
[Server] Derive the public key from private_key.der on the deprecated key-folder path可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭enhancement good first issue
难度 2/5 1-3 小时 新手友好度 62/100
unitycatalog/unitycatalog#2363 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
unitycatalog/unitycatalog#2280 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
unitycatalog/unitycatalog#2277 · 1 条评论 ·
维护者通常 1 天内回复
-
[CI] Submit the sbt dependency graph so Dependabot alerts cover the server's Java dependencies可能已有人在做 @iam-hk 于 7 天前认领。 未关闭enhancement good first issue
难度 2/5 1-3 小时 新手友好度 78/100
unitycatalog/unitycatalog#2255 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[Python] Timedelta parameter defaults are rendered unquoted in generated function SQL可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
unitycatalog/unitycatalog#2148 · 1 条评论 ·
维护者通常 1 天内回复
查看 unitycatalog/unitycatalog 的全部 Issue
相似的 Issue
-
status: waiting-for-triage
难度 2/5 1-3 小时 新手友好度 74/100
spring-projects/spring-ai#7459 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
维护者通常 1 天内回复
-
Type: Possible bug
难度 2/5 1-3 小时 新手友好度 72/100
AntennaPod/AntennaPod#8946 ·
维护者通常 1 天内回复
-
Core Documentation
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 2 天内回复
-
Default exclude patterns drop production files whose names end in "test" or "spec" (Contest.java, Latest.swift, Aspec.hs)可能已有人在做 @alex09x 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
alibaba/open-code-review#2078 ·
维护者通常 1 天内回复