Istvan Toth created PHOENIX-7092:
------------------------------------
Summary: 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
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)