[
https://issues.apache.org/jira/browse/SOLR-17935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18035410#comment-18035410
]
Chris M. Hostetter commented on SOLR-17935:
-------------------------------------------
Skimming the tests modified by this jira, i'm going to make a guess that the
reason this test in particular is failing may be some combination of:
* this test (now) sets InputStreamResponseParser objects on the SolrClients
(as the default parser)
** most other tests using InputStreamResponseParser seem to set it on
SolrRequest (per request basis)
* this test fires many requests in a loop against the same clients over and
over
So maybe InputStreamResponseParser (or some realted code in HttpSolrClientBase)
has always had a memory leak and this change just helped expose it?
----
I'm also incredibly confused by this change in the commit...
{noformat}
@Override
- public NamedList<Object> processResponse(InputStream body, String encoding) {
- throw new UnsupportedOperationException();
+ public NamedList<Object> processResponse(InputStream body, String encoding)
throws IOException {
+ StringWriter writer = new StringWriter();
+ new InputStreamReader(body, encoding == null ? "UTF-8" :
encoding).transferTo(writer);
+ String output = writer.toString();
+ NamedList<Object> list = new NamedList<>();
+ list.add("response", output);
+ return list;
}
{noformat}
...this method seems like it was copied verbatim from the (now removed)
NoOpResponseParser, and makes no sense given the entire design/purpose of
InputStreamResponseParser.
The special case logic in HttpSolrClientBase for dealing with
InputStreamResponseParser (to ensure that the InputStream is left open)
_SHOULD_ mean that this method is never called (which is why it previously
threw UnsupOpEx) which makes it all the more suspicious that this new impl was
added y this commit ... why is this here????
> Remove NoOpResponseParser
> -------------------------
>
> Key: SOLR-17935
> URL: https://issues.apache.org/jira/browse/SOLR-17935
> Project: Solr
> Issue Type: Sub-task
> Reporter: Eric Pugh
> Assignee: Eric Pugh
> Priority: Minor
> Labels: pull-request-available
> Fix For: 10.0
>
> Time Spent: 2h 10m
> Remaining Estimate: 0h
>
> The NoOpResponseParser has been deprecated in favour of the
> InputStreamResponseParser
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]