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

    // 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 java.io.File's renameTo(File)
  call fails.  It has been reported that this happens on Windows JVMs.
Contributed by: Matt Tucker

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to