[ 
https://issues.apache.org/jira/browse/IMPALA-9069?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16955966#comment-16955966
 ] 

Peter Vary commented on IMPALA-9069:
------------------------------------

Hive supposed to clean up the records for tables which are dropped:
* Should happen here: 
https://github.com/apache/hive/blob/master/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java#L3309
* Called from here: 
https://github.com/apache/hive/blob/master/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/AcidEventListener.java#L58
* Registered here: 
https://github.com/apache/hive/blob/master/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java#L563

With debug logs you should see the queries it tries to execute:
{code}
        for (String query : queries) {
          LOG.debug("Going to execute update <" + query + ">");
          stmt.executeUpdate(query);
        }

        LOG.debug("Going to commit");
{code}
or some error:
{code}
        if (e.getMessage().contains("does not exist")) {
          LOG.warn("Cannot perform cleanup since metastore table does not 
exist");
        } else {
          throw new MetaException("Unable to clean up " + 
StringUtils.stringifyException(e));
        }
{code}

It might be interesting to check the logs if you have time.

Thanks,
Peter

> Impala should acquire an ACID lock when dropping a database
> -----------------------------------------------------------
>
>                 Key: IMPALA-9069
>                 URL: https://issues.apache.org/jira/browse/IMPALA-9069
>             Project: IMPALA
>          Issue Type: Bug
>            Reporter: Zoltán Borók-Nagy
>            Assignee: Zoltán Borók-Nagy
>            Priority: Major
>              Labels: impala-acid
>
> Dropping a table takes an exclusive lock on the table, hence it cannot be 
> removed while other queries are working on it.
> However, dropping a database doesn't take any locks, so it just starts 
> removing table data even if there are locks on the table by other clients.
> Moreover, the Hive Metastore doesn't delete the locks that refer to dropped 
> entities and when the database and tables are re-created those locks will be 
> still around (because the locks refer to the databases and tables via their 
> names).
> Impala should acquire an exclusive lock on the database during DROP.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to