lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <markrmil...@gmail.com>
Subject Re: Unintelligent implementation of IndexWriter locking?
Date Sun, 30 Aug 2009 17:30:03 GMT
Jan Peter Stotz wrote:
> Hi Lucene users,
>
> at the moment I have some problems with the locking mechanism of
> IndexWriter. Some times my application quits/terminates before I can close
> the IndexWriter. Then the "write.lock" file remains and prohibits every
> write access to my index. Of course I could simply unlock the directory
> with the index but from the description of the unlock mechanism I read out
> that it does not check if some other process still holds the lock and
> therefore concurrent writes from multiple process may occur.
>
> Is the locking mechanism really so "dumb"?
> If yes - why does Lucene not use a more intelligent approach, e.g. the one
> via RandomAccessFile as it is presented here:
>
> http://jimlife.wordpress.com/2008/07/21/java-application-make-sure-only-singleone-instance-running-with-file-lock-ampampampampamp-shutdownhook/
>
> Ciao, Jan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>   
Have you tried using a native lock factory?

-- 
- Mark

http://www.lucidimagination.com




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


Mime
View raw message