Dmitry, > Is there a possible other disadvantage that would result in a > legitimate > error condition being ignored? For instance, > if there are multiple threads indexing, could they step on each other > when they try to update the segments file?
I don't know of any problems like this. Ideally, the file rename would be atomic (hence Doug's comments to that effect in FSDirectory). However, it's impossible to make this operation atomic under Java, and the only way to make the operation robust is to add the manual file copy if renameTo fails. Also, it's worth noting that FSDirectory.renameFile is synchronized and that the lock files should take care of multiple VM's trying to do indexing. So, there really shouldn't be any real error cases we're covering up with the extra logic. > Also, what VMs have you experienced these kinds of failures with? Most often Windows VM's. However, we've seen problems with renameTo on almost every platform and VM combination (but usually only when renameTo is being called more often than Lucene generally does). I know that others are running into these issues from a search through lucene-user (http://nagoya.apache.org/eyebrowse/ReadMsg?[EMAIL PROTECTED] che.org&msgId=116687). Regards, Matt --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
