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

StreamHandler should allow connections to be closed early

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.6.1, 7.0, master (8.0)
    • Component/s: None
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      Before a stream is drained out, if we call close() we get an exception like this:

      at
      org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:215)
      at
      org.apache.http.impl.io.ChunkedInputStream.close(ChunkedInputStream.java:316)
      at
      org.apache.http.impl.execchain.ResponseEntityProxy.streamClosed(ResponseEntityProxy.java:128)
      at
      org.apache.http.conn.EofSensorInputStream.checkClose(EofSensorInputStream.java:228)
      at
      org.apache.http.conn.EofSensorInputStream.close(EofSensorInputStream.java:174)
      at sun.nio.cs.StreamDecoder.implClose(StreamDecoder.java:378)
      at sun.nio.cs.StreamDecoder.close(StreamDecoder.java:193)
      at java.io.InputStreamReader.close(InputStreamReader.java:199)
      at
      org.apache.solr.client.solrj.io.stream.JSONTupleStream.close(JSONTupleStream.java:91)
      at
      org.apache.solr.client.solrj.io.stream.SolrStream.close(SolrStream.java:186)
      
      

      As quoted from https://www.mail-archive.com/solr-user@lucene.apache.org/msg130676.html the problem seems to when we hit an exception the /steam handler does not close the stream.

        Attachments

        1. SOLR-10698.patch
          4 kB
          Joel Bernstein

          Activity

            People

            • Assignee:
              erickerickson Erick Erickson
              Reporter:
              varunthacker Varun Thacker
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: