You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Alexander Kolbasov (JIRA)" <ji...@apache.org> on 2017/10/07 00:16:02 UTC

[jira] [Commented] (HIVE-17735) ObjectStore.addNotificationEvent is leaking queries

    [ 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)