Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-4266

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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
        smolloy Steve Molloy added a comment -

        Proposed patch.

        Show
        smolloy Steve Molloy added a comment - Proposed patch.
        Hide
        markrmiller@gmail.com 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
        markrmiller@gmail.com 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 Steve Rowe added a comment -

        Mark, should we push to 4.2?

        Show
        steve_rowe Steve Rowe added a comment - Mark, should we push to 4.2?
        Hide
        commit-tag-bot 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 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
        markrmiller@gmail.com Mark Miller added a comment -

        Thanks Steve!

        Show
        markrmiller@gmail.com Mark Miller added a comment - Thanks Steve!
        Hide
        commit-tag-bot 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 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:
            markrmiller@gmail.com Mark Miller
            Reporter:
            smolloy Steve Molloy
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development