It looks like the .fdx and one of the .f[0-9]* files are out of sync. The .fdx file for each segment should be exactly eight times as long as all of the .f[0-9] files for that segment.

This could happen if Lucene's file locking is disabled or broken. What version of Lucene are you using? What JVM? File locking is known to be broken over NFS, and wasn't even present in early versions of Lucene. Are you using an ordinary FSDirectory to store your index?

The scenario I can see that this would happen in is if two processes or threads are permitted to modify an index at once. If one were optimizing and one were just adding a single document, then the same segment name would be allocated to both, but one would write a much larger segment. If their operations were interleaved then some of the segment's files would be written by one of them, and some by the other, resulting in the sort of inconsistency you're seeing.

You might start logging the start and end time of document additions and index optimizations, to see if this sort of thing is happening...

Doug

petite_abeille wrote:
Hello,

Here is a pretty fatal exception I get from time to time in Lucene...

java.io.IOException: read past EOF
at org.apache.lucene.store.FSInputStream.readInternal(FSDirectory.java:277)
at org.apache.lucene.store.InputStream.readBytes(Unknown Source)
at org.apache.lucene.index.SegmentReader.norms(Unknown Source)
at org.apache.lucene.index.SegmentReader.norms(Unknown Source)
at org.apache.lucene.search.TermQuery.scorer(Unknown Source)
at org.apache.lucene.search.BooleanQuery.scorer(Unknown Source)
at org.apache.lucene.search.Query.scorer(Unknown Source)
at org.apache.lucene.search.IndexSearcher.search(Unknown Source)
at org.apache.lucene.search.Hits.getMoreDocs(Unknown Source)
at org.apache.lucene.search.Hits.<init>(Unknown Source)
at org.apache.lucene.search.Searcher.search(Unknown Source)
at org.apache.lucene.search.Searcher.search(Unknown Source)

Any idea what could cause such, er, misbehavior?

PA.


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to