You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/03/31 14:37:00 UTC

[jira] [Updated] (HIVE-29528) Managed database directory not deleted after DROP DATABASE when hive.acid.lockless.reads.enabled=true

     [ https://issues.apache.org/jira/browse/HIVE-29528?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated HIVE-29528:
----------------------------------
    Labels: pull-request-available  (was: )

> Managed database directory not deleted after DROP DATABASE when hive.acid.lockless.reads.enabled=true
> -----------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-29528
>                 URL: https://issues.apache.org/jira/browse/HIVE-29528
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive, Metastore, Standalone Metastore
>            Reporter: Venugopal Reddy K
>            Assignee: Venugopal Reddy K
>            Priority: Major
>              Labels: pull-request-available
>
> *[Description]*
> When {{hive.acid.lockless.reads.enabled}} is set to {*}true{*}, {{DROP DATABASE}} becomes a non-blocking operation in Hive Metastore (HMS).
> In this mode:
>  * The managed database directory (e.g., {{{}/warehouse/managed/mydb.db{}}}) is *not deleted immediately* upon issuing the {{DROP DATABASE}} request.
>  * Deletion of ACID table data is handled *asynchronously* by a background cleaner thread.
>  * Table data and corresponding table directories are eventually removed as expected.
> However, the {*}managed database directory itself is never deleted{*}, even after All ACID tables are cleaned up.
> This results in {*}orphaned database directories remaining indefinitely in the filesystem{*}, leading to potential storage bloat and inconsistencies between HMS metadata and filesystem state.
> *[Steps to Reproduce]*
>  # Enable {{hive.acid.lockless.reads.enabled=true}}
>  # Create a managed database (e.g., {{{}mydb{}}})
>  # Create one or more ACID tables inside the database
>  # Insert data into the tables
>  # Execute {{DROP DATABASE mydb CASCADE}}
>  # Wait for the background cleaner thread to delete table data
>  # Check the filesystem for database directory.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)