0 Replies Latest reply on Apr 9, 2012 4:40 PM by Francisco Lozano

    Probable bug in InfinispanDirectory, reproduced in 5.1.3.Final, test-case

    Francisco Lozano Newbie

      I've managed to reproduce the EOF problem in a test-case.


      Refer to https://community.jboss.org/thread/197903?tstart=0 for more details, but basically is that I get the following exceptions when using InfinispanDirectory with async cache loader:

       

      java.io.IOException: Read past EOF

      at org.infinispan.lucene.SingleChunkIndexInput.readByte(SingleChunkIndexInput.java:76) ~[infinispan-lucene-directory-5.1.3.FINAL.jar:5.1.3.FINAL]

      at org.apache.lucene.store.ChecksumIndexInput.readByte(ChecksumIndexInput.java:41) ~[lucene-core-3.5.0.jar:3.5.0 1204988 - simon - 2011-11-22 14:46:51]

      at org.apache.lucene.store.DataInput.readInt(DataInput.java:84) ~[lucene-core-3.5.0.jar:3.5.0 1204988 - simon - 2011-11-22 14:46:51]

      at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:272) ~[lucene-core-3.5.0.jar:3.5.0 1204988 - simon - 2011-11-22 14:46:51]

      at org.apache.lucene.index.IndexFileDeleter.<init>(IndexFileDeleter.java:182) ~[lucene-core-3.5.0.jar:3.5.0 1204988 - simon - 2011-11-22 14:46:51]

      at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1178) ~[lucene-core-3.5.0.jar:3.5.0 1204988 - simon - 2011-11-22 14:46:51]

      ...

       

      java.io.FileNotFoundException: Error loading medatada for index file: _6.fnm|M|idx12345678

                at org.infinispan.lucene.InfinispanDirectory.openInput(InfinispanDirectory.java:282) ~[infinispan-lucene-directory-5.1.3.FINAL.jar:5.1.3.FINAL]

                at org.apache.lucene.index.FieldInfos.<init>(FieldInfos.java:74) ~[lucene-core-3.5.0.jar:3.5.0 1204988 - simon - 2011-11-22 14:46:51]

                at org.apache.lucene.index.IndexWriter.getFieldInfos(IndexWriter.java:1222) ~[lucene-core-3.5.0.jar:3.5.0 1204988 - simon - 2011-11-22 14:46:51]

                at org.apache.lucene.index.IndexWriter.getCurrentFieldInfos(IndexWriter.java:1238) ~[lucene-core-3.5.0.jar:3.5.0 1204988 - simon - 2011-11-22 14:46:51]

                at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1171) ~[lucene-core-3.5.0.jar:3.5.0 1204988 - simon - 2011-11-22 14:46:51]

       

       

      Please see https://github.com/flozano/infinispan-lucene-eof-problem for a working example of the problem

      (and accept my apologies for the ugly code)