[ https://issues.apache.org/jira/browse/HIVE-8459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14510001#comment-14510001 ]
Alan Gates commented on HIVE-8459: ---------------------------------- Changed this to minor as an extra shared lock on the table makes no semantic difference. The lock on the partition would block any xlocks on the table anyway, and a read lock doesn't block other read locks or semi-shared locks. > DbLockManager locking table in addition to partitions > ----------------------------------------------------- > > Key: HIVE-8459 > URL: https://issues.apache.org/jira/browse/HIVE-8459 > Project: Hive > Issue Type: Bug > Components: Locking > Affects Versions: 0.14.0 > Reporter: Alan Gates > Assignee: Alan Gates > Priority: Minor > > Queries and operations on partitioned tables are generating locks on the > whole table when they should only be locking the partition. For example: > {code} > select count(*) from concur_orc_tab_part where ds = 'today'; > {code} > This should only be locking the partition ds='today'. But instead: > {code} > mysql> select * from HIVE_LOCKS; > +----------------+----------------+----------+---------+---------------------+--------------+---------------+--------------+-------------------+----------------+---------+--------------------+ > | HL_LOCK_EXT_ID | HL_LOCK_INT_ID | HL_TXNID | HL_DB | HL_TABLE > | HL_PARTITION | HL_LOCK_STATE | HL_LOCK_TYPE | HL_LAST_HEARTBEAT | > HL_ACQUIRED_AT | HL_USER | HL_HOST | > +----------------+----------------+----------+---------+---------------------+--------------+---------------+--------------+-------------------+----------------+---------+--------------------+ > | 428 | 1 | 0 | default | concur_orc_tab_part > | NULL | a | r | 1413311172000 | > 1413311171000 | hive | node-1.example.com | > | 428 | 2 | 0 | default | concur_orc_tab_part > | ds=today | a | r | 1413311172000 | > 1413311171000 | hive | node-1.example.com | > +----------------+----------------+----------+---------+---------------------+--------------+---------------+--------------+-------------------+----------------+---------+--------------------+ > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)