hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DJ Choi (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-7172) Potential resource leak in HiveSchemaTool#getMetaStoreSchemaVersion()
Date Wed, 11 Jun 2014 00:47:02 GMT

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

DJ Choi updated HIVE-7172:
--------------------------

    Status: Patch Available  (was: Open)

> Potential resource leak in HiveSchemaTool#getMetaStoreSchemaVersion()
> ---------------------------------------------------------------------
>
>                 Key: HIVE-7172
>                 URL: https://issues.apache.org/jira/browse/HIVE-7172
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Minor
>
> {code}
>       ResultSet res = stmt.executeQuery(versionQuery);
>       if (!res.next()) {
>         throw new HiveMetaException("Didn't find version data in metastore");
>       }
>       String currentSchemaVersion = res.getString(1);
>       metastoreConn.close();
> {code}
> When HiveMetaException is thrown, metastoreConn.close() would be skipped.
> stmt is not closed upon return from the method.



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

Mime
View raw message