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

James Taylor updated PHOENIX-1364:
----------------------------------
    Attachment: 1364-v3.patch

Revised patch with only the trace related changes (plus one missing htable 
close). The statement closes aren't absolutely necessary (though we can fix 
those post 4.2), as the close of a connection closes all the statements.

[~jesse_yates] - would you mind giving this a quick look?

> Fix resource leaks in various classes
> -------------------------------------
>
>                 Key: PHOENIX-1364
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1364
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: Ted Yu
>         Attachments: 1364-v2.txt, 1364-v3.patch, fix-resource-leak-v1.txt
>
>
> Statement / PreparedStatement should be closed after query completes.
> Below is an example of resource leak from 
> MetaDataUtil#deleteViewIndexSequences():
> {code}
>      public static void deleteViewIndexSequences(PhoenixConnection 
> connection, PName name) throws SQLException {
>          SequenceKey key = getViewIndexSequenceKey(null, name);
>         connection.createStatement().executeUpdate("DELETE FROM " + 
> PhoenixDatabaseMetaData.SEQUENCE_TABLE_NAME +
> {code}
> The Statement created by connection.createStatement() should be closed upon 
> return.



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

Reply via email to