You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Hongsen Liu (JIRA)" <ji...@apache.org> on 2019/06/01 07:13:00 UTC
[jira] [Created] (KYLIN-4027) Kylin-jdbc module has tcp resource
leak
Hongsen Liu created KYLIN-4027:
----------------------------------
Summary: 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
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)