Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
-
None
Description
TxnHandler::acquireLock should close DB connection on exiting the function.
If there are any exceptions downstream, this connection isn't closed cleanly. In a corner case, hikari connection leak detector reported the following
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)
Attachments
Issue Links
- duplicates
-
HIVE-24236 Connection leak in TxnHandler
- Closed