[ 
https://issues.apache.org/jira/browse/SOLR-8808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16648458#comment-16648458
 ] 

Jason Gerlowski commented on SOLR-8808:
---------------------------------------

Picking this guy back up in a bit of time I have.  

Looks like the {{missing content stream}} error is produced by all 4 SolrClient 
impl's in this case.

There's a few options for how we can handle this:

1. Return a dummy response
2. Head off the RSE by checking whether the list is null/empty initially and 
throwing a clearer exception (IllegalArgumentException)
3. Correct the underlying request code in HttpSolrClient and 
ConcurrentUpdateSolrClient to handle this case.

My vote for fixing this is to (2).  We can make the exception message much 
better to clear up any potential confusion.  And since the behavior already 
throws an exception, the change won't risk breaking any clients.

I initially liked the idea of returning a dummy response, but now that Solr's 
update API returns some useful data (the "rf" field) that people could be 
looking at and acting on, mocking up a dummy response seems a little sketchy.

> SolrJ deleteById causes missing content stream exception
> --------------------------------------------------------
>
>                 Key: SOLR-8808
>                 URL: https://issues.apache.org/jira/browse/SOLR-8808
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrJ
>    Affects Versions: 5.5
>            Reporter: Markus Jelsma
>            Priority: Minor
>             Fix For: 6.2, 7.0
>
>         Attachments: SOLR-8808.patch
>
>
> {code}
> client.deleteById(new ArrayList<String>()); 
> {code}
> Causes
> {code}
> org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error 
> from server at http://127.0.0.1:50083/collection1: Error from server at 
> http://127.0.0.1:50083/control_collection: missing content stream
>         at 
> __randomizedtesting.SeedInfo.seed([6C4973F1A077B797:65D362791DA8A1AD]:0)
>         at 
> org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:576)
>         at 
> org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:240)
>         at 
> org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:229)
>         at 
> org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:149)
>         at org.apache.solr.client.solrj.SolrClient.commit(SolrClient.java:482)
>         at org.apache.solr.client.solrj.SolrClient.commit(SolrClient.java:463)
> {code}
> Although this is not a big issue, it had me puzzled for a while. A test 
> unrelated to one i was working on started sending empty deletes. Causing 
> above trace.
> Perhaps SolrJ should guard for empty input, just ignore and return.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to