lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrzej Bialecki>
Subject Re: FSDirectory patch for file renaming
Date Mon, 17 Feb 2003 22:10:48 GMT
Matt Tucker wrote:
> Otis,
> Yesterday, we had a data set on a particular Windows box that would
> consistently bomb out with the rename error. That's what finally motivated
> me to make the patch. After applying the patch the rebuild worked perfectly.
> I also removed the renameTo method call and tested with my manual copy code
> being used all the time (that also worked perfectly).

Interesting... One of the causes for renameTo failing is when the other 
file already exists. Could you insert a check for nu.exists() right 
after nu.delete()? Perhaps this check will be sufficient for the problem 
to disappear, because this behaviour looks to me like a timing problem...

This could be a shot in the wild, but could it be caused by bad 
timing/bad use of native API within JVM (e.g. a filesystem caching the 
requests)? Does it behave differently if run on FAT vs. NTFS filesystem? 
This would of course mean a gross violation of File.delete() contract, 
but JVM is just a program and it may contain bugs... Or maybe it's 
Windows that contains bugs, I don't remember... ;-) Does it behave the 
same way in JDK 1.3.x as in JDK 1.4.x?

Best regards,
Andrzej Bialecki

Software Architect, System Integration Specialist
FreeBSD developer (

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

View raw message