You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Eugene Koifman (JIRA)" <ji...@apache.org> on 2016/04/09 23:12:25 UTC

[jira] [Created] (HIVE-13470) Too many locks acquired for partitioned read

Eugene Koifman created HIVE-13470:
-------------------------------------

             Summary: Too many locks acquired for partitioned read
                 Key: HIVE-13470
                 URL: https://issues.apache.org/jira/browse/HIVE-13470
             Project: Hive
          Issue Type: Bug
          Components: Transactions
    Affects Versions: 1.3.0
            Reporter: Eugene Koifman
            Assignee: Eugene Koifman


consider 
{noformat}
create table TAB_PART (a int, b int) partitioned by (p string) clustered by (a) into 2  buckets stored as orc TBLPROPERTIES ('transactional'='true')
select a from  TAB_PART where p = 'blah'
{noformat}

If the table is truly empty (exactly as above) then DbLockManger will acquire SHARED_READ lock on the table (for the select stmt)

If prior to Select, one runs "alter table TAB_PART add partition (p = 'blah')" then 2 SHARED_LOCKS are acquired: 1 on table and 1 on partition.

Should only get 1 partition level lock.
The behavior of lock manager is such because the generated query plan creates ReadEntity objects this way.

Todo: try actually inserting data and see if that changes anything.



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