[ 
https://issues.apache.org/jira/browse/HIVE-7172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14561965#comment-14561965
 ] 

Ted Yu edited comment on HIVE-7172 at 3/10/17 1:43 AM:
-------------------------------------------------------

lgtm

{code}
141               } catch (SQLException e) {
142                 //do nothing.
{code}
Consider logging the exception.


was (Author: yuzhih...@gmail.com):
lgtm
{code}
141               } catch (SQLException e) {
142                 //do nothing.
{code}
Consider logging the exception.

> 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
>            Assignee: DJ Choi
>            Priority: Minor
>         Attachments: HIVE-7172.patch
>
>
> {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.3.15#6346)

Reply via email to