[
https://issues.apache.org/jira/browse/HIVE-24135?focusedWorklogId=607501&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-607501
]
ASF GitHub Bot logged work on HIVE-24135:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 06/Jun/21 15:49
Start Date: 06/Jun/21 15:49
Worklog Time Spent: 10m
Work Description: nrg4878 opened a new pull request #2354:
URL: https://github.com/apache/hive/pull/2354
### What changes were proposed in this pull request?
The database's managed location is not deleted when the database is dropped.
This fix addresses the issue.
### Why are the changes needed?
Even though db.getManagedLocation() might be null, there is always a default
managed location for the database. On a drop database, we check to see if this
location is null and only drop it if not null. But regardless of whether or not
it is null, there is always an assigned location that needs to be dropped.
### Does this PR introduce _any_ user-facing change?
NO
### How was this patch tested?
Unit test + manually
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 607501)
Time Spent: 1h 10m (was: 1h)
> Drop database doesn't delete directory in managed location
> ----------------------------------------------------------
>
> Key: HIVE-24135
> URL: https://issues.apache.org/jira/browse/HIVE-24135
> Project: Hive
> Issue Type: Sub-task
> Reporter: Karen Coppage
> Assignee: Naveen Gangam
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> Repro:
> say the default managed location is managed/hive and the default external
> location is external/hive.
> {code:java}
> create database db1; -- creates: external/hive/db1.db
> create table db1.table1 (i int); -- creates: managed/hive/db1.db and
> managed/hive/db1.db/table1
> drop database db1 cascade; -- removes : external/hive/db1.db and
> managed/hive/db1.db/table1
> {code}
> Problem: Directory managed/hive/db1.db remains.
> Since HIVE-22995, dbs have a managed (managedLocationUri) and an external
> location (locationUri). I think the issue is that
> HiveMetaStore.HMSHandler#drop_database_core deletes only the db directory in
> the external location.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)