lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Hind (JIRA)" <>
Subject [jira] Commented: (LUCENE-415) Merge error during add to index (IndexOutOfBoundsException)
Date Wed, 22 Mar 2006 07:40:59 GMT
    [ ] 

Andy Hind commented on LUCENE-415:

The problem is that the output is going into a file that already exists. 
I assume it leaves and then finds old bits during random access and gets confused.

If a merge fails while it is writing its output segment file you have a segment file that
contains rubbish.
This can occur if you are unlucky when you kill the JVM (and to repeat the problem, set a
break point and kill the JVM just before the segment write completes). The next time a merge
takes place it writes to the segment file that already exists - as the same file name is generated
for the new segment file. It always blows with an error similar to that reported for this

The file.getChannel() solved some fairly odd but repeatable issues with stale/invalid file
handles under windows XP.

> Merge error during add to index (IndexOutOfBoundsException)
> -----------------------------------------------------------
>          Key: LUCENE-415
>          URL:
>      Project: Lucene - Java
>         Type: Bug
>   Components: Index
>     Versions: 1.4
>  Environment: Operating System: Linux
> Platform: Other
>     Reporter: Daniel Quaroni
>     Assignee: Lucene Developers

> I've been batch-building indexes, and I've build a couple hundred indexes with 
> a total of around 150 million records.  This only happened once, so it's 
> probably impossible to reproduce, but anyway... I was building an index with 
> around 9.6 million records, and towards the end I got this:
> java.lang.IndexOutOfBoundsException: Index: 54, Size: 24
>         at java.util.ArrayList.RangeCheck(
>         at java.util.ArrayList.get(
>         at org.apache.lucene.index.FieldInfos.fieldInfo(
>         at org.apache.lucene.index.FieldInfos.fieldName(
>         at org.apache.lucene.index.SegmentTermEnum.readTerm(
> :149)
>         at
> (
>         at
> (
>         at org.apache.lucene.index.SegmentMerger.mergeTermInfos
> (
>         at org.apache.lucene.index.SegmentMerger.mergeTerms
> (
>         at org.apache.lucene.index.SegmentMerger.merge(
>         at org.apache.lucene.index.IndexWriter.mergeSegments
> (
>         at org.apache.lucene.index.IndexWriter.maybeMergeSegments
> (
>         at org.apache.lucene.index.IndexWriter.addDocument(
>         at org.apache.lucene.index.IndexWriter.addDocument(

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message