lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <s...@elyograg.org>
Subject Re: StreamingUpdateSolrServer - exceptions not propagated
Date Tue, 27 Mar 2012 04:25:47 GMT
On 3/26/2012 6:43 PM, Mark Miller wrote:
> It doesn't get thrown because that logic needs to continue - you don't necessarily want
one bad document to stop all the following documents from being added. So the exception is
sent to that method with the idea that you can override and do what you would like. I've written
sample code around stopping and throwing an exception, but I guess its not totally trivial.
Other ideas for reporting errors have been thrown around in the past, but no work on it has
gotten any traction.
>
>
> - Mark Miller
> lucidimagination.com
>
> On Mar 26, 2012, at 7:33 PM, Shawn Heisey wrote:
>
>> I've been building a new version of my app that keeps our Solr indexes up to date.
 I had hoped to use StreamingUpdateSolrServer instead of CommonsHttpSolrServer for performance
reasons, but I have run into a showstopper problem that has made me revert to CHSS.
>>
>> I have been relying on exception handling to detect when there is any kind of problem
with any request sent to Solr.  Looking at the code for SUSS, it seems that any exceptions
thrown by lower level code are simply logged, then forgotten as if they had never happened.

The problem is that I currently have no way (that I know of so far) to 
detect that a problem happened.  As far as my code is concerned, 
everything worked, so it updates my position tracking and those 
documents will never be inserted.  I have not yet delved into the 
response object to see whether it can tell me anything.  My code 
currently assumes that if no exception was thrown, it was successful.  
This works with CHSS.  I will write some test code that tries out 
various error situations and see what the response contains.

Thanks,
Shawn


Mime
View raw message