hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Kolbasov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-17735) ObjectStore.addNotificationEvent is leaking queries
Date Sat, 07 Oct 2017 00:16:02 GMT

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

Alexander Kolbasov commented on HIVE-17735:
-------------------------------------------

There is a second leak:

{code}
  private void lockForUpdate() throws MetaException {
    String selectQuery = "select NEXT_EVENT_ID from NOTIFICATION_SEQUENCE";
    String selectForUpdateQuery = sqlGenerator.addForUpdateClause(selectQuery);
    new RetryingExecutor(hiveConf, () -> {
      Query query = pm.newQuery("javax.jdo.query.SQL", selectForUpdateQuery);
      query.setUnique(true);
      // only need to execute it to get db Lock
      query.execute();
    }).run();
  }
{code}

The selectQuery is never closed.

> ObjectStore.addNotificationEvent is leaking queries
> ---------------------------------------------------
>
>                 Key: HIVE-17735
>                 URL: https://issues.apache.org/jira/browse/HIVE-17735
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>    Affects Versions: 3.0.0
>            Reporter: Alexander Kolbasov
>
> In ObjectStore.addNotificationEvent():
> {code}
>       Query objectQuery = pm.newQuery(MNotificationNextId.class);
>       Collection<MNotificationNextId> ids = (Collection) objectQuery.execute();
> {code}
> The query is never closed.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message