lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <>
Subject [jira] Commented: (LUCENE-307) Lock obtain time out errors when opening readers and writers
Date Fri, 23 Jun 2006 12:30:30 GMT
    [ ] 

Michael McCandless commented on LUCENE-307:

This looks like a thread starvation issue.  This is suggested in the above comment and I agree.

Meaning, because the IndexWriter lock acquisition is ad-hoc (sleep for 1 second and try again),
it's entirely likely this will just eventually time out.

But, I'm surprised that the FileLock implementation solves this.  The JavaDocs don't seem
to indicate that this API makes any effort at scheduling / sequencing lock acquisition to
prevent starvation.  Or perhaps this was a platform specific capability that FileLock inherited.

> Lock obtain time out errors when opening readers and writers
> ------------------------------------------------------------
>          Key: LUCENE-307
>          URL:
>      Project: Lucene - Java
>         Type: Bug

>   Components: Other
>     Versions: 1.4
>  Environment: Operating System: All
> Platform: All
>     Reporter: Reece (YT)
>     Assignee: Lucene Developers
>  Attachments:,
> The attached Java file shows a locking issue that occurs with Lucene 1.4.2.
> One thread opens and closes an IndexReader.  The other thread opens an
> IndexWriter, adds a document and then closes the IndexWriter.  I would expect
> that this app should be able to happily run without an issues.
> It fails with:
> Lock obtain timed out
> Is this expected?  I thought a Reader could be opened while a Writer is adding a
> document.
> I am able to get the error in less than 5 minutes when running this on Windows
> XP and Mac OS X.
> Any help is appreciated.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

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

View raw message