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 2004/07/28 21:37:16 UTC

Rebuild and corruption

Has anyone had any experience with their index getting corrupted by an
abnormal termination? We have occasionally seen problems occur when our
program gets killed abnormally -- e.g. power loss. Here's an example of what
we saw on one of these occasions:

2004-07-21 14:19:04.317] Error in IndexWriter [12]
java.io.IOException: read past EOF
	at org.apache.lucene.store.InputStream.refill(Unknown Source)
	at org.apache.lucene.store.InputStream.readByte(Unknown Source)
	at org.apache.lucene.index.SegmentMerger.mergeNorms(Unknown Source)
	at org.apache.lucene.index.SegmentMerger.merge(Unknown Source)
	at org.apache.lucene.index.IndexWriter.mergeSegments(Unknown Source)
	at org.apache.lucene.index.IndexWriter.maybeMergeSegments(Unknown
Source)
	at org.apache.lucene.index.IndexWriter.addDocument(Unknown Source)


I have two questions. 

1) Can anyone recommend the best way to avoid any possibility of corruption
in the case where an IndexWriter doesn't get closed properly? (It seems that
termination during a merge operation is the most vulnerable point.)

2) Is there any way to recover a corrupted index, other than rebuilding from
scratch?



Steve Rajavuori
O'Pin Systems
2600 Eagan Woods Dr., Suite 400
Eagan, MN  55121
651-994-6556
stever@opin.com 

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


Re: Rebuild and corruption

Posted by Paul <pa...@waite.net.nz>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Steve Rajavuori wrote:

> I have two questions.
>
> 1) Can anyone recommend the best way to avoid any possibility of corruption
> in the case where an IndexWriter doesn't get closed properly? (It seems
> that termination during a merge operation is the most vulnerable point.)

> 2) Is there any way to recover a corrupted index, other than rebuilding
> from scratch?


I am also extremely interested in any answers to these questions.

Cheers,
Paul.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBCB+8tfkpAgkMOyMRAm7fAJ47u2eLNB9o98aI8rqQPHfNUK5QpQCePe0m
p0hm3iPtCxIZd9JUr6PfJ3I=
=CepG
-----END PGP SIGNATURE-----

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