Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
0.14.0
-
None
-
None
Description
Queries and operations on partitioned tables are generating locks on the whole table when they should only be locking the partition. For example:
select count(*) from concur_orc_tab_part where ds = 'today';
This should only be locking the partition ds='today'. But instead:
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 | +----------------+----------------+----------+---------+---------------------+--------------+---------------+--------------+-------------------+----------------+---------+--------------------+