lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Tucker" <m...@jivesoftware.com>
Subject RE: FSDirectory patch for file renaming
Date Mon, 17 Feb 2003 18:07:45 GMT
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?listName=lucene-user@jakarta.apa
che.org&msgId=116687).

Regards,
Matt


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message