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

Aihua Xu commented on HIVE-13129:
---------------------------------

When HiveServer2 stops, eventually the connection will be released. But if the 
server keeps running, we will always have that connection to HMS during the 
lifetime while it never gets used after that. And we will have one connection 
for each HiveServer2 instance. 

That can be considered as leaking I guess.

> CliService leaks HMS connection
> -------------------------------
>
>                 Key: HIVE-13129
>                 URL: https://issues.apache.org/jira/browse/HIVE-13129
>             Project: Hive
>          Issue Type: Sub-task
>          Components: HiveServer2
>    Affects Versions: 2.1.0
>            Reporter: Aihua Xu
>            Assignee: Aihua Xu
>         Attachments: HIVE-13129.patch
>
>
> HIVE-12790 fixes the HMS connection leaking. But seems there is one more 
> connection from CLIService.
> The init() function in CLIService will get info from DB but we never close 
> the HMS connection for this service main thread.  
> {noformat}
>     // creates connection to HMS and thus *must* occur after kerberos login 
> above
>     try {
>       applyAuthorizationConfigPolicy(hiveConf);
>     } catch (Exception e) {
>       throw new RuntimeException("Error applying authorization policy on hive 
> configuration: "
>           + e.getMessage(), e);
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to