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

ASF GitHub Bot updated HIVE-27534:
----------------------------------
    Labels: pull-request-available  (was: )

> HMS may leak db connection when execute exchange partitions
> -----------------------------------------------------------
>
>                 Key: HIVE-27534
>                 URL: https://issues.apache.org/jira/browse/HIVE-27534
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>            Reporter: zju_zsx
>            Priority: Major
>              Labels: pull-request-available
>
> In your production deployment, the Hive Thrift server is deployed. In the 
> {{HMSHandler.exchange_partitions}} method, it executes 
> {{RawStore.openTransaction}} and performs some checks. If these checks fail, 
> an exception is thrown without executing {{commitTransaction}} or 
> {{{}rollbackTransaction{}}}. This can result in a leakage of the underlying 
> database connection, as it is not returned to the thread pool. Consequently, 
> all threads may be blocked at the point of obtaining a connection from the 
> connection pool.  
> We should place all operations that come after RawStore.openTransaction 
> inside a try-finally block.
>  
> reproduce statement:
> {code:java}
> ALTER TABLE dev.yyy EXCHANGE PARTITION (par='') WITH TABLE ods.xxx; {code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to