lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (SOLR-2308) Race condition still exists in StreamingUpdateSolrServer which could cause it to hang
Date Sun, 30 Jan 2011 01:49:43 GMT

     [ https://issues.apache.org/jira/browse/SOLR-2308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Yonik Seeley resolved SOLR-2308.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0
                   3.1

Oops, I saw Johannes fix posted in SOLR-1744 and didn't know this issue existed.
Anyway, this should now be fixed in 3x and trunk.

> Race condition still exists in StreamingUpdateSolrServer which could cause it to hang
> -------------------------------------------------------------------------------------
>
>                 Key: SOLR-2308
>                 URL: https://issues.apache.org/jira/browse/SOLR-2308
>             Project: Solr
>          Issue Type: Bug
>          Components: clients - java
>    Affects Versions: 1.4.1
>            Reporter: Johannes
>             Fix For: 3.1, 4.0
>
>
> We are still seeing the same issue as SOLR-1711 & SOLR-1885 with Solr1.4.1
> We get into this situation when all the runner threads die due to a broken pipe, while
the BlockingQueue is still full. All of the producer threads are all blocked on the BlockingQueue.put()
method. Since the runners are spawned by the producers, which are all blocked, runner threads
never get created to drain the queue.
> Here's a potential fix. In the runner code, replace these lines:
> {code}
> // remove it from the list of running things...
> synchronized (runners) {
>     runners.remove( this );
> }
> {code}
> with these lines:
> {code}
> // remove it from the list of running things unless we are the last runner and the queue
is full...
> synchronized (runners) {
>     if (runners.size() == 1 && queue.remainingCapacity() == 0) {
>         // keep this runner alive
>         scheduler.execute(this);
>     } else {
>         runners.remove( this );
>     }
> }
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message