You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Istvan Toth (Jira)" <ji...@apache.org> on 2023/11/02 08:51:00 UTC
[jira] [Assigned] (PHOENIX-7092) PhoenixDatabaseMetadata leaves unclosed Statements around
[ https://issues.apache.org/jira/browse/PHOENIX-7092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Istvan Toth reassigned PHOENIX-7092:
------------------------------------
Assignee: Istvan Toth
> PhoenixDatabaseMetadata leaves unclosed Statements around
> ---------------------------------------------------------
>
> Key: PHOENIX-7092
> URL: https://issues.apache.org/jira/browse/PHOENIX-7092
> Project: Phoenix
> Issue Type: Bug
> Reporter: Istvan Toth
> Assignee: Istvan Toth
> Priority: Major
>
> PhoenixDatabaseMetadata creates a new Statement object for almost every call.
> These are mostly regular PhoenixPreparedStatement objects, which are created in the call, and the their ResultSet is simply returned as a result.
> The problem is that these Statements are never closed properly.
> In theory, they would be closed when the Connection object used to create the PhoenixDatabaseMetadata is closed.
> (In practice at the moment PhoenixConnection doesn't close its Statement objects at all, but that's a different issue)
> This kind of flows from the API definition, but we could
> - Copy the results into a List-based ResultSet, and close the Statment before returning
> - Implement closeOnCompletion(), which is meant to handle exactly this scenario.
> (The latter seems to be the better solution)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)