lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: running a lucene indexing app as a windows service on xp, crashing
Date Fri, 04 Aug 2006 21:28:02 GMT

> The Lucene code is crashing under circumstances that seem pretty lame.
> At periodic intervals, lucene tries to File.renameTo(newfile).
> Sometimes this fails, so Lucene implemented some fall-back code to
> manually copy the contents of the file from old to new.  Our problem is
> that sometimes *this* fails too, then the whole thing blows up.

I agree Lucene should not be affected by things like having Windows 
Explorer windows up!

Can you post the traceback you're seeing?  In particular, what's failing 
about the fallback approach?

Is it in the FSDirectory's renameFile method?  There is this comment in 

     // Rename the old file to the new one. Unfortunately, the renameTo()
     // method does not work reliably under some JVMs.  Therefore, if the
     // rename fails, we manually rename by copying the old file to the 
new one

and correspondingly this comment in the original commit for this (back 
on March 1 2003):

- Added a manual renaming of files in case the's renameTo(File)
   call fails.  It has been reported that this happens on Windows JVMs.
Contributed by: Matt Tucker


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

View raw message