You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Mithun Radhakrishnan (JIRA)" <ji...@apache.org> on 2016/08/10 17:13:20 UTC

[jira] [Updated] (HIVE-13754) Fix resource leak in HiveClientCache

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

Mithun Radhakrishnan updated HIVE-13754:
----------------------------------------
          Resolution: Fixed
       Fix Version/s: 2.0.0
    Target Version/s: 2.0.0, 1.2.1  (was: 1.2.1, 2.0.0)
              Status: Resolved  (was: Patch Available)

> Fix resource leak in HiveClientCache
> ------------------------------------
>
>                 Key: HIVE-13754
>                 URL: https://issues.apache.org/jira/browse/HIVE-13754
>             Project: Hive
>          Issue Type: Bug
>          Components: Clients
>    Affects Versions: 1.2.1, 2.0.0
>            Reporter: Chris Drome
>            Assignee: Chris Drome
>             Fix For: 2.0.0
>
>         Attachments: HIVE-13754-branch-1.patch, HIVE-13754.1-branch-1.patch, HIVE-13754.1.patch, HIVE-13754.patch
>
>
> Found that the {{users}} reference count can go into negative values, which prevents {{tearDownIfUnused}} from closing the client connection when called.
> This leads to a build up of clients which have been evicted from the cache, are no longer in use, but have not been shutdown.
> GC will eventually call {{finalize}}, which forcibly closes the connection and cleans up the client, but I have seen as many as several hundred open client connections as a result.
> The main resource for this is caused by RetryingMetaStoreClient, which will call {{reconnect}} on acquire, which calls {{close}}. This will decrement {{users}} to -1 on the reconnect, then acquire will increase this to 0 while using it, and back to -1 when it releases it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)