You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Rick Hillegas (JIRA)" <ji...@apache.org> on 2014/05/30 16:53:02 UTC

[jira] [Resolved] (DERBY-6440) Connections opened by ForeignTableVTI never get released

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

Rick Hillegas resolved DERBY-6440.
----------------------------------

    Resolution: Fixed

Resolving this issue. There is a remaining issue raised by Knut: Should something be done to explicitly close the connection when it is removed from the HashMap. If the external connection is a connection to another Derby database, then I would expect that its resources would be released when the no-longer referenced connection is garbage collected. Behavior for other databases may vary but I would expect garbage collection would clean up resources for connections to other databases too. If someone is not satisfied with this response, feel free to open a follow-on issue.

> Connections opened by ForeignTableVTI never get released
> --------------------------------------------------------
>
>                 Key: DERBY-6440
>                 URL: https://issues.apache.org/jira/browse/DERBY-6440
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 10.11.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Rick Hillegas
>         Attachments: derby-6440-01-aa-dropConnectionOnUnload.diff
>
>
> I noticed during a run of suites.All that one database instance never got garbage collected, even after it had been shut down. It turned out it could not get garbage collected because it was still referenced from the static HashMap _connections in ForeignTableVTI. Looking closer at ForeignTableVTI, it looks as if it only calls put() and get() on the HashMap, never remove(), so its memory footprint will keep increasing as it is used.
> It would be good to have some way (preferably automatic) of releasing the resources held by ForeignTableVTI when they are no longer needed.



--
This message was sent by Atlassian JIRA
(v6.2#6252)