You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Antony Bowesman <ad...@teamware.com> on 2006/11/17 03:48:26 UTC

IOException question

Hi,

I have the IndexWriter.infoStream set to System.out and get the following

merging segments _4m (2 docs) _4n (1 docs) into _4o (3 docs)
java.io.IOException: Cannot delete PathToDB\_29.cfs; Will re-try later.
java.io.IOException: Cannot delete PathToDB\_29.cfs; Will re-try later.

Is this normal?  IndexWriter.deleteFiles() is giving the message and it 
explicitly catches the IOException which is what makes me think it might be normal.

On the other hand, I'm a newbie, so I'm probably doing something wrong, but I 
can't figure out what.  It happens consistently when I open the index and add a 
document to it.  It doesn't seem to affect the indexes at all.

Any ideas what can cause this?
Antony




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


Re: IOException question

Posted by Antony Bowesman <ad...@teamware.com>.
Hi Mike,

> Do you also have a reader open against this index?  If yes, then this is 
> totally normal on Windows.  A reader holds open the segments cfs files 
> that it is using, so when the writer tries to delete them (because they 
> were merged) the delete fails and Lucene will try again later.

Aha, yes, I have a searcher open with a reader.  Thanks for explanation.
Antony



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


Re: IOException question

Posted by Michael McCandless <lu...@mikemccandless.com>.
Antony Bowesman wrote:
> Hi,
> 
> I have the IndexWriter.infoStream set to System.out and get the following
> 
> merging segments _4m (2 docs) _4n (1 docs) into _4o (3 docs)
> java.io.IOException: Cannot delete PathToDB\_29.cfs; Will re-try later.
> java.io.IOException: Cannot delete PathToDB\_29.cfs; Will re-try later.
> 
> Is this normal?  IndexWriter.deleteFiles() is giving the message and it 
> explicitly catches the IOException which is what makes me think it might 
> be normal.

Do you also have a reader open against this index?  If yes, then this is 
totally normal on Windows.  A reader holds open the segments cfs files 
that it is using, so when the writer tries to delete them (because they 
were merged) the delete fails and Lucene will try again later.

Mike

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