You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/07/09 12:25:00 UTC

[jira] [Commented] (KYLIN-4027) Kylin-jdbc module has tcp resource leak

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

ASF GitHub Bot commented on KYLIN-4027:
---------------------------------------

nichunen commented on pull request #702: KYLIN-4027, protect client execute
URL: https://github.com/apache/kylin/pull/702
 
 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Kylin-jdbc module has tcp resource leak
> ---------------------------------------
>
>                 Key: KYLIN-4027
>                 URL: https://issues.apache.org/jira/browse/KYLIN-4027
>             Project: Kylin
>          Issue Type: Bug
>          Components: Driver - JDBC
>    Affects Versions: all
>            Reporter: Hongsen Liu
>            Priority: Major
>              Labels: easyfix
>             Fix For: Future
>
>
> In Kylin-jdbc module, the class KylinClient has TCP resource leak when it sends  http request. For example,  like the following code snipper
>  
> {quote}HttpResponse response = httpClient.execute(post);
> try {
>      if (response.getStatusLine().getStatusCode() != 200 &&          response.getStatusLine().getStatusCode() != 201) {
>            throw asIOException(post, response);
>       }
>         SQLResponseStub stub =  jsonMapper.readValue(           response.getEntity().getContent(), SQLResponseStub.class);
>           return stub;
> } finally {
>          post.releaseConnection();
> }
> {quote}
> The code HttpClient.execute(post) is not in try segment, if it throws exception internally ,
> the finally segment won't run.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)