Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-4027

Kylin-jdbc module has tcp resource leak

    XMLWordPrintableJSON

Details

    • Important

    Description

      In Kylin-jdbc module, the class KylinClient has TCP resource leak when it sends  http request. For example,  like the following code snipper

       

      HttpResponse response = httpClient.execute(post);
      try {
           if (response.getStatusLine().getStatusCode() != 200 &&          response.getStatusLine().getStatusCode() != 201)

      Unknown macro: {            throw asIOException(post, response);       }

              SQLResponseStub stub =  jsonMapper.readValue(           response.getEntity().getContent(), SQLResponseStub.class);
                return stub;
      } finally

      Unknown macro: {          post.releaseConnection(); }

      The code HttpClient.execute(post) is not in try segment, if it throws exception internally ,

      the finally segment won't run.

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Senix Liu Hongsen Liu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: