You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Mark Miller (JIRA)" <ji...@apache.org> on 2013/10/12 22:35:43 UTC

[jira] [Updated] (SOLR-4327) SolrJ code review indicates potential for leaked HttpClient connections

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

Mark Miller updated SOLR-4327:
------------------------------

    Fix Version/s: 5.0
                   4.6
                   4.5.1
         Assignee: Mark Miller

> SolrJ code review indicates potential for leaked HttpClient connections
> -----------------------------------------------------------------------
>
>                 Key: SOLR-4327
>                 URL: https://issues.apache.org/jira/browse/SOLR-4327
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 4.0
>            Reporter: Karl Wright
>            Assignee: Mark Miller
>             Fix For: 4.5.1, 4.6, 5.0
>
>
> The SolrJ HttpSolrServer implementation does not seem to handle errors properly and seems capable of leaking HttpClient connections.  See the request() method in org.apache.solr.client.solrj.impl.HttpSolrServer.  The issue is that exceptions thrown from within this method do not necessarily consume the stream when an exception is thrown.  There is a try/finally block which reads (in part):
> {code}
>     } finally {
>       if (respBody != null && processor!=null) {
>         try {
>           respBody.close();
>         } catch (Throwable t) {} // ignore
>       }
>     }
> {code}
> But, in order to always guarantee consumption of the stream, it should include:
> {code}
> method.abort();
> {code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org