lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: java.io.IOException: Access is denied on java.io.WinNTFileSystem.createFileExclusively
Date Mon, 28 Aug 2006 16:18:01 GMT
Jason Polites wrote:
> It was definately NTFS, unfortunately it was a while ago, and most of the
> code has changed.
> 
> Basically I had a multi-threaded app where multiple threads were writing to
> the index (but exclusively... that is, I had my own locking mechanism
> preventing concurrent writes).
> 
> In a separate JVM, I had a fairly standard IndexSearcher based component 
> via
> a web interface.  Rapid hits on "refresh" in the browser executing a search
> while indexing was being performed resulted in occasional but recurring
> FileNotFound errors.
> 
> I recall that it was a "segments" file reported as not found.. if that
> helps.

OK thanks for the info.  It's odd that you saw this with a local NTFS 
drive.  I was under the impression that locking worked correctly in that 
case.  Lucene's commit lock is supposed to prevent a searcher from 
init'ing while a writer is writing a new segments file.

One of the things in process (see java-dev for gory details) is to 
switch to the OS native locking that's now available through java.nio. 
Currently Lucene uses java.io.File.createNewFile for locking and the 
javadoc for that method has a spooky warning about not using it for locking.

Mike


---------------------------------------------------------------------
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