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

Aihua Xu updated HIVE-10984:
----------------------------
    Summary: After "lock table shared" explicit lock, "lock database exclusive" 
should fail.  (was: "Lock table" explicit lock command doesn't lock the 
database object.)

> After "lock table shared" explicit lock, "lock database exclusive" should 
> fail.
> -------------------------------------------------------------------------------
>
>                 Key: HIVE-10984
>                 URL: https://issues.apache.org/jira/browse/HIVE-10984
>             Project: Hive
>          Issue Type: Bug
>          Components: Locking
>            Reporter: Aihua Xu
>            Assignee: Aihua Xu
>
> There is an issue in ZooKeeperHiveLockManager.java, in which when locking 
> exclusively on a table, it doesn't lock the database object (which does if 
> it's from the query).
> The current implementation of ZooKeeperHiveLockManager will lock the the 
> object and the parents, and won't check the children when it tries to acquire 
> lock on certain object. Then it will cause the following scenario which 
> should not be allowed but right now it goes through.
> {noformat}
> use default; 
> lock table db1.tbl1 shared; 
> lock database db1 exclusive;
> {noformat}
> Also check the test case lockneg_try_lock_db_in_use.q to add more reasonable 
> failure cases.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to