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

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

     [ https://issues.apache.org/jira/browse/KYLIN-4027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

nichunen updated KYLIN-4027:
----------------------------
    Fix Version/s:     (was: Future)
                   v3.0.0-alpha2

> 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: v3.0.0-alpha2
>
>
> 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.14#76016)