Solr
  1. Solr
  2. SOLR-4266

HttpSolrServer does not release connection properly on exception when no response parser is used

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.1, 6.0
    • Component/s: clients - java
    • Labels:
      None

      Description

      When using HttpSolrServer for requests with no response parser, any unpredicted status code (401, 500...) will throw the exception properly, but will not close the connection. Since no handle for connection is returned in case of exception, it should be closed. So only case where it should not be closed is when the stream is actually returned, that is, when no response parser is used and the call is successful.

      1. patch-4266.txt
        1 kB
        Steve Molloy

        Activity

        Hide
        Steve Molloy added a comment -

        Proposed patch.

        Show
        Steve Molloy added a comment - Proposed patch.
        Hide
        Mark Miller added a comment -

        Any committer feel free to steal this from me, but assigning myself so we look at it for 4.1 and it doesn't first get pushed due to no assignee.

        Show
        Mark Miller added a comment - Any committer feel free to steal this from me, but assigning myself so we look at it for 4.1 and it doesn't first get pushed due to no assignee.
        Hide
        Steve Rowe added a comment -

        Mark, should we push to 4.2?

        Show
        Steve Rowe added a comment - Mark, should we push to 4.2?
        Hide
        Commit Tag Bot added a comment -

        [trunk commit] Mark Robert Miller
        http://svn.apache.org/viewvc?view=revision&revision=1434109

        SOLR-4266: HttpSolrServer does not release connection properly on exception when no response parser is used.

        Show
        Commit Tag Bot added a comment - [trunk commit] Mark Robert Miller http://svn.apache.org/viewvc?view=revision&revision=1434109 SOLR-4266 : HttpSolrServer does not release connection properly on exception when no response parser is used.
        Hide
        Mark Miller added a comment -

        Thanks Steve!

        Show
        Mark Miller added a comment - Thanks Steve!
        Hide
        Commit Tag Bot added a comment -

        [branch_4x commit] Mark Robert Miller
        http://svn.apache.org/viewvc?view=revision&revision=1434354

        SOLR-4266: HttpSolrServer does not release connection properly on exception when no response parser is used.

        Show
        Commit Tag Bot added a comment - [branch_4x commit] Mark Robert Miller http://svn.apache.org/viewvc?view=revision&revision=1434354 SOLR-4266 : HttpSolrServer does not release connection properly on exception when no response parser is used.

          People

          • Assignee:
            Mark Miller
            Reporter:
            Steve Molloy
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development