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

Denys Kuzmenko updated HIVE-30235:
----------------------------------
    Description: 
  With hive.txn.ext.locking.enabled=true, DDL that takes a DDL_EXCLUSIVE Hive 
lock (ADD/REPLACE/CHANGE COLUMNS,                                               
                                  
  UNSET TBLPROPERTIES, TRUNCATE, DROP PARTITION) on an Iceberg table with 
engine.hive.lock-enabled=true holds an                                          
                                      
  EXCLUSIVE lock on db.table, and its Iceberg commit then requests an EXCLUSIVE 
HMS lock on the same table (same                                                
                                
  resource since HIVE-30231). The statement waits on itself until 
iceberg.hive.lock-timeout-ms (3 min) and fails with                             
                                              
  "LockException: Timed out ... waiting for lock on <db>.<table>".              
                                                                                
                                
                                                                                
                                                                                
                                
  DML on such tables is already rejected up front by 
HiveIcebergStorageHandler.getLockType. Proposed: have                           
                                                           
  AcidUtils.makeLockComponents ask the storage handler for DDL_EXCLUSIVE of 
non-native tables too, so the same check                                        
                                    
  rejects the DDL before any lock is taken; handlers overriding getLockType 
(Iceberg, Kafka) return EXCLUSIVE for it.                                       
                                    


> Iceberg: exclusive DDL on a lock-enabled table waits on its own Hive lock 
> under external locking 
> -------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-30235
>                 URL: https://issues.apache.org/jira/browse/HIVE-30235
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Denys Kuzmenko
>            Priority: Major
>
>   With hive.txn.ext.locking.enabled=true, DDL that takes a DDL_EXCLUSIVE Hive 
> lock (ADD/REPLACE/CHANGE COLUMNS,                                             
>                                     
>   UNSET TBLPROPERTIES, TRUNCATE, DROP PARTITION) on an Iceberg table with 
> engine.hive.lock-enabled=true holds an                                        
>                                         
>   EXCLUSIVE lock on db.table, and its Iceberg commit then requests an 
> EXCLUSIVE HMS lock on the same table (same                                    
>                                             
>   resource since HIVE-30231). The statement waits on itself until 
> iceberg.hive.lock-timeout-ms (3 min) and fails with                           
>                                                 
>   "LockException: Timed out ... waiting for lock on <db>.<table>".            
>                                                                               
>                                     
>                                                                               
>                                                                               
>                                     
>   DML on such tables is already rejected up front by 
> HiveIcebergStorageHandler.getLockType. Proposed: have                         
>                                                              
>   AcidUtils.makeLockComponents ask the storage handler for DDL_EXCLUSIVE of 
> non-native tables too, so the same check                                      
>                                       
>   rejects the DDL before any lock is taken; handlers overriding getLockType 
> (Iceberg, Kafka) return EXCLUSIVE for it.                                     
>                                       



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to