[ 
https://issues.apache.org/jira/browse/HIVE-16844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16100549#comment-16100549
 ] 

Mithun Radhakrishnan commented on HIVE-16844:
---------------------------------------------

[~sbeeram], my apologies for the radio silence.

bq. ... let me know if you think its better to revert the change until this is 
sorted out.
Your argument regarding connection-leaks is (and was) a compelling one. Keeping 
the {{PersistenceManagementFactory}} open in lieu of addressing the concurrency 
issue would not be right. As such, perhaps it's best to keep this commit for 
the moment.

bq. ... we are pulling the plug on the connections while another thread is 
possibly using it.
I'll examine the code more closely to see if retries from other threads will go 
through. This code is nasty. :/

bq. I am just beginning to catch up on the implementation of 
HCatClientHMSImpl/HCatUtil and will need to look through a bit more through 
that code on the JDO configuration that will ultimately get used etc.
This isn't all that much to that side of the code. It functions purely as an 
HMSClient. I'm not sure that it has bearing on the JDO-config (unless I've 
missed something again).


> Fix Connection leak in ObjectStore when new Conf object is used
> ---------------------------------------------------------------
>
>                 Key: HIVE-16844
>                 URL: https://issues.apache.org/jira/browse/HIVE-16844
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>            Reporter: Sunitha Beeram
>            Assignee: Sunitha Beeram
>             Fix For: 3.0.0
>
>         Attachments: HIVE-16844.1.patch
>
>
> The code path in ObjectStore.java currently leaks BoneCP (or Hikari) 
> connection pools when a new configuration object is passed in. The code needs 
> to ensure that the persistence-factory is closed before it is nullified.
> The relevant code is 
> [here|https://github.com/apache/hive/blob/master/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java#L290].
>  Note that pmf is set to null, but the underlying connection pool is not 
> closed.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to