lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Goeller (JIRA)" <>
Subject [jira] Commented: (SOLR-1711) Race condition in org/apache/solr/client/solrj/impl/
Date Mon, 14 Mar 2011 08:53:29 GMT


Christian Goeller commented on SOLR-1711:

I tried out the comitted patch with SOLR 1.4.1 (built SOLR on my own). Unfortunately I still
have an issue when having the following scenario:

Server: Runs SOLR servlet
Client: Adds documents to the index using the StreamingUpdateSolrServer in several threads.

If the server crashes or becomes unreachable for the client, the StreamingUpdateSolrServer
on the client will end up in an infinite loop, trying to send requests to the server.
It should be possible to stop/shutdown/dispose the StreamingUpdateSolrServer somehow from
another thread. 

Clearing the queue and stopping the executor service from outside stopps the infinite loop.

> Race condition in org/apache/solr/client/solrj/impl/
> ----------------------------------------------------------------------------------
>                 Key: SOLR-1711
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: clients - java
>    Affects Versions: 1.4, 1.5
>            Reporter: Attila Babo
>            Assignee: Yonik Seeley
>            Priority: Critical
>             Fix For: 3.1, 4.0
>         Attachments: SOLR-1711.patch, StreamingUpdateSolrServer.patch
>   Original Estimate: 1h
>  Remaining Estimate: 1h
> While inserting a large pile of documents using StreamingUpdateSolrServer there is a
race condition as all Runner instances stop processing while the blocking queue is full. With
a high performance client this could happen quite often, there is no way to recover from it
at the client side.
> In StreamingUpdateSolrServer there is a BlockingQueue called queue to store UpdateRequests,
there are up to threadCount number of workers threads from StreamingUpdateSolrServer.Runner
to read that queue and push requests to a Solr instance. If at one point the BlockingQueue
is empty all workers stop processing it and pushing the collected content to Solr which could
be a time consuming process, sometimes all worker threads are waiting for Solr. If at this
time the client fills the BlockingQueue to full all worker threads will quit without processing
any further and the main thread will block forever.
> There is a simple, well tested patch attached to handle this situation.

This message is automatically generated by JIRA.
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message