Skip to content

HIVE-29587: Cleanup acid table dir after async drop#6459

Merged
nrg4878 merged 2 commits into
apache:masterfrom
VenuReddy2103:HIVE-29587
May 6, 2026
Merged

HIVE-29587: Cleanup acid table dir after async drop#6459
nrg4878 merged 2 commits into
apache:masterfrom
VenuReddy2103:HIVE-29587

Conversation

@VenuReddy2103
Copy link
Copy Markdown
Contributor

@VenuReddy2103 VenuReddy2103 commented Apr 30, 2026

What changes were proposed in this pull request?

Added a new compaction type(DEFERRED_CLEANUP). It is used while adding a row to compaction queue table when table is soft deleted.

Why are the changes needed?

When drop acid table is followed by drop database cascade operation, the acid table directory itself is never deleted. Hence managed database directory is also never deleted. Orphaned table and database directories remaining indefinitely in the filesystem, leading to potential storage bloat and inconsistencies between HMS metadata and filesystem state

Does this PR introduce any user-facing change?

No

How was this patch tested?

Tested manually

@VenuReddy2103 VenuReddy2103 changed the title [WIP]HIVE-29587: Cleanup acid table dir after async drop HIVE-29587: Cleanup acid table dir after async drop May 1, 2026
@deniskuzZ
Copy link
Copy Markdown
Member

thanks for the refactor @VenuReddy2103 , that looks much cleaner

@deniskuzZ
Copy link
Copy Markdown
Member

deniskuzZ commented May 4, 2026

with DEFFERED_CLEANUP type introduction we could probably simplify CompactionCleaner checks like if (isNull(location)) { and replace with type check

not in scope for this PR

Copy link
Copy Markdown
Member

@deniskuzZ deniskuzZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM +1

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

@nrg4878 nrg4878 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the HMS side of changes (thrift + some handler code)

@nrg4878 nrg4878 merged commit f9705a8 into apache:master May 6, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants