[
https://issues.apache.org/jira/browse/HIVE-7021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14243680#comment-14243680
]
Nemon Lou commented on HIVE-7021:
---------------------------------
Even without HIVE-4629,HiveServer2 can leak OperationHandle on failed queries.
When a JDBCClient runs queries like "select * from table_not_exists",
HiveServer2 fail this query duiring compile,but leaves an OperationHandle in
memory (due to async mode) without pass it back to client side .
Shall I fire a new jira for this? Or would you fix it in this patch?
> HiveServer2 memory leak on failed queries
> -----------------------------------------
>
> Key: HIVE-7021
> URL: https://issues.apache.org/jira/browse/HIVE-7021
> Project: Hive
> Issue Type: Bug
> Components: HiveServer2
> Affects Versions: 0.12.0
> Reporter: Naveen Gangam
> Assignee: Naveen Gangam
> Attachments: HIVE-4629+HIVE-7021.1.patch, HIVE-7021.1.patch
>
>
> The number of the following objects keeps increasing if a query causes an
> exception:
> org.apache.hive.service.cli.HandleIdentifier
> org.apache.hive.service.cli.OperationHandle
> org.apache.hive.service.cli.log.LinkedStringBuffer
> org.apache.hive.service.cli.log.OperationLog
> The leak can be observed using a JDBCClient that runs something like this
> connection =
> DriverManager.getConnection("jdbc:hive2://" + hostname + ":10000/default",
> "", "");
> statement = connection.createStatement();
> statement.execute("CREATE TEMPORARY FUNCTION
> dummy_function AS 'dummy.class.name'");
> The above SQL will fail if HS2 cannot load "dummy.class.name" class. Each
> iteration of such query will result in +1 increase in instance count for the
> classes mentioned above.
> This will eventually cause OOM in the HS2 service.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)