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