Skip to content

[core] Fix drop table when table directory is missing on disk#8130

Open
ArnavBalyan wants to merge 1 commit into
apache:masterfrom
ArnavBalyan:arnavb/drop-table-hms-orphan
Open

[core] Fix drop table when table directory is missing on disk#8130
ArnavBalyan wants to merge 1 commit into
apache:masterfrom
ArnavBalyan:arnavb/drop-table-hms-orphan

Conversation

@ArnavBalyan
Copy link
Copy Markdown
Member

Purpose

Tests

  • UT

@JingsongLi
Copy link
Copy Markdown
Contributor

I think this catch block is too broad for a destructive operation. dropTable now catches TableNotExistException | RuntimeException while collecting external paths, and then proceeds to dropTableImpl(...) anyway.

That covers the intended "table directory/schema files are already missing" case, but it also swallows real failures such as schema parse errors, branch listing failures, permission errors, or transient filesystem/runtime errors from schemaManager().listAll(), branchManager().branches(), or getSchemaExternalPaths(...). In those cases the code may remove the catalog/table metadata while silently losing the external path information that was supposed to be protected/cleaned.

Could we narrow this to the specific missing-table/missing-path condition this PR wants to tolerate, and let other runtime failures abort the drop?

@ArnavBalyan ArnavBalyan force-pushed the arnavb/drop-table-hms-orphan branch from 0c1e842 to 7e43238 Compare June 7, 2026 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants