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)

Reply via email to