Affects Version/s: None
Fix Version/s: None
Diagnoses/hypothosis summarized/re-worded from comment below...
- Assume request execution happens successfully
- then, when the QueryResponseWriter goes to marshal the response, assume there is some exception writing the results – perhaps due to the Resolver w/ ResultContext + Searcher (could be an IOException)
- the Exception from attempting to write the response may propogate all the way up to the "try" in HttpSolrCall.call() ... which once caught is then passed to "sendError"
- sendError creates a completely new SolrQueryResponse, sets the exception on it, and asks the QueryResponseWriter to write it out
- BUT the OutputStream has already had a bunch of data written to it ... which may be resulting in a byte sequence that confuses the unmarshal code and may result in weird exceptions – or worse: validly structured, but corrupt data
The fundemental problem is that when HttpSolrCall to "start over" writtng the response – but the JavaBinCodec doesn't have any way to recognize that ... it can read partial data and then be confused by the "new" data that comes after it
Perhaps there should be a special "TAG" that means "Ignore everything you've already recieved and start over" that we should emit at the begining of every marshal() call?
Original bug report