You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Ayush Saxena (Jira)" <ji...@apache.org> on 2022/11/10 06:59:00 UTC

[jira] [Reopened] (HIVE-25483) TxnHandler::acquireLock should close the DB conn to avoid connection leaks

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

Ayush Saxena reopened HIVE-25483:
---------------------------------

> TxnHandler::acquireLock should close the DB conn to avoid connection leaks
> --------------------------------------------------------------------------
>
>                 Key: HIVE-25483
>                 URL: https://issues.apache.org/jira/browse/HIVE-25483
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Rajesh Balamohan
>            Assignee: KIRTI RUGE
>            Priority: Major
>
> TxnHandler::acquireLock should close DB connection on exiting the function. 
> [https://github.com/apache/hive/blob/master/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java#L5688]
> [https://github.com/apache/hive/blob/master/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java#L5726]
> [https://github.com/apache/hive/blob/master/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java#L5737-L5740]
>  If there are any exceptions downstream, this connection isn't closed cleanly. In a corner case, hikari connection leak detector reported the following
> {noformat}
> 2021-08-26 09:19:18,102 WARN  com.zaxxer.hikari.pool.ProxyLeakTask: [HikariPool-4 housekeeper]: Connection leak detection triggered for org.postgresql.jdbc.PgConnection@77f76747, stack trace follows
> java.lang.Exception: Apparent connection leak detected
>         at org.apache.hadoop.hive.metastore.txn.TxnHandler.getDbConn(TxnHandler.java:3843)
>         at org.apache.hadoop.hive.metastore.txn.TxnHandler.acquireLock(TxnHandler.java:5135) 
>         at org.apache.hadoop.hive.ql.txn.compactor.Initiator.run(Initiator.java:107) {noformat}



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