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 Steve Rajavuori <St...@opin.com> on 2003/07/11 21:25:40 UTC

Files getting deleted when optimize is killed?

I've had a problem on several occasions where my entire index is deleted --
that is, EVERY file (except 'segments') is gone. There were many users on
the system each time, so its a little hard to tell for sure what was going
on, but my theory is this:

My code will automatically call optimize( ) periodically. Because the index
is very large, it can take a long time. It looks like an administrator may
have killed my process, and its possible that it was killed while an
optimize( ) was in progress.

I have two questions:

1) Does anyone know if killing an optimize( ) in progress could wipe out all
files like this? (New index created in temporary files that were not saved
properly, while old index files were already deleted???)

2) Does anyone know of any other way all files in an index could be
inadvertently deleted (e.g. through killing a process)? For example, if you
kill the process during an 'add' would that cause all files to be deleted?

Steve Rajavuori

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


Re: Files getting deleted when optimize is killed?

Posted by Otis Gospodnetic <ot...@yahoo.com>.
--- Steve Rajavuori <St...@opin.com> wrote:
> I've had a problem on several occasions where my entire index is
> deleted --
> that is, EVERY file (except 'segments') is gone. There were many
> users on
> the system each time, so its a little hard to tell for sure what was
> going
> on, but my theory is this:
> 
> My code will automatically call optimize( ) periodically. Because the
> index
> is very large, it can take a long time. It looks like an
> administrator may
> have killed my process, and its possible that it was killed while an
> optimize( ) was in progress.
> 
> I have two questions:
> 
> 1) Does anyone know if killing an optimize( ) in progress could wipe
> out all
> files like this? (New index created in temporary files that were not
> saved
> properly, while old index files were already deleted???)

I highly doubt it.

> 2) Does anyone know of any other way all files in an index could be
> inadvertently deleted (e.g. through killing a process)? For example,
> if you
> kill the process during an 'add' would that cause all files to be
> deleted?

Same as above.  You can create an artificial, large index for testing
purposes.  Call optimize once in a while, and then kill the process.  I
don't think Lucene will remove your files.

Otis


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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