[ http://issues.apache.org/jira/browse/LUCENE-576?page=comments#action_12413039 ]
Ian Boston commented on LUCENE-576: ----------------------------------- Found the problem, This is *NOT* a bug, I am an Idiot! I had a stale IndexWriter in the stack, which had old Segment Inforamation, hence it tried to access segments that had already been merged. Sorry, please close this 'bug' > FileNotFoundException triggered by maybeeMergeSergments > ------------------------------------------------------- > > Key: LUCENE-576 > URL: http://issues.apache.org/jira/browse/LUCENE-576 > Project: Lucene - Java > Type: Bug > Components: Index > Versions: 1.9 > Environment: 1.9.1, OSX, JDK 1.4.2 > Reporter: Ian Boston > > IndexWriter.magbeMergeSergments appears to be attempting to merge the same > segments twice in a row which causes a FileNotFoundException in the fnm file > for the segment deep inside FiledInfos.<init> > In the IndexWriter.maybeMergeSegments below, minSegement has the same value > on 2 consecutive loops, the InfoStream output looks like > 00:32:08,847 INFO ClusterFSIndexStorageTest:294 - Indexing=============== > merging segments _1x (1 docs) _1y (1 docs) _1z (1 docs) _20 (1 docs) _21 (1 > docs) _22 (1 docs) _23 (1 docs) _24 (1 docs) _25 (1 docs) _26 (1 docs) into > _27 (10 docs) > 00:32:09,136 INFO ClusterFSIndexStorageTest:287 - Optimize=============== > merging segments _28 (1 docs) _29 (1 docs) _2a (1 docs) _2b (1 docs) _2c (1 > docs) _2d (1 docs) _2e (1 docs) _2f (1 docs) _2g (1 docs) into _2h (9 docs) > 00:32:09,314 INFO JDBCClusterIndexStore:454 - DB Segment > 1148425869787:1148427128344:true:Created:Wed May 24 00:11:09 BST 2006 > UpdateWed May 24 00:32:08 BST 2006 > 00:32:09,316 INFO JDBCClusterIndexStore:682 - LO Segment > 1148425869787:1148427128843:false:Created:Wed May 24 00:11:09 BST 2006 > UpdateWed May 24 00:32:08 BST 2006 > 00:32:09,426 INFO JDBCClusterIndexStore:836 - Packed > packet1148427129319.zip|18034|1148425869787:1148427128344:true:Created:Wed > May 24 00:11:09 BST 2006 UpdateWed May 24 00:32:08 BST 2006 > 00:32:09,681 INFO JDBCClusterIndexStore:527 - DB Updated > 1148425869787:1148427129318:true:Created:Wed May 24 00:11:09 BST 2006 > UpdateWed May 24 00:32:09 BST 2006 > 00:32:09,856 INFO ClusterFSIndexStorage:152 - End Index Cycle > 00:32:09,871 INFO ClusterFSIndexStorageTest:291 - Reopen================= > 00:32:09,887 INFO ClusterFSIndexStorage:142 - Start Index Cycle > 00:32:09,906 INFO JDBCClusterIndexStore:454 - DB Segment > 1148425869787:1148427129318:true:Created:Wed May 24 00:11:09 BST 2006 > UpdateWed May 24 00:32:09 BST 2006 > 00:32:09,917 INFO JDBCClusterIndexStore:72 - Update: DB Segments = 1 > 00:32:09,920 INFO JDBCClusterIndexStore:682 - LO Segment > 1148425869787:1148427129318:false:Created:Wed May 24 00:11:09 BST 2006 > UpdateWed May 24 00:32:09 BST 2006 > 00:32:09,921 INFO JDBCClusterIndexStore:75 - Update: Local Segments = 1 > 00:32:09,947 INFO ClusterFSIndexStorage:61 - Found 1 segments > 00:32:09,953 INFO ClusterFSIndexStorageTest:294 - Indexing=============== > merging segments _2h (9 docs) _2i (1 docs) into _2j (10 docs) > merging segments _2h (9 docs) > an exception is thrown after "(9 docs)" > java.io.FileNotFoundException: > /Users/ieb/Caret/sakai22/sakai/search/search-impl/tmpindexstore/1148425869787/_2h.fnm > (No such file or directory) > at java.io.RandomAccessFile.open(Native Method) > at java.io.RandomAccessFile.<init>(RandomAccessFile.java:204) > at > org.apache.lucene.store.FSIndexInput$Descriptor.<init>(FSDirectory.java:425) > at org.apache.lucene.store.FSIndexInput.<init>(FSDirectory.java:434) > at org.apache.lucene.store.FSDirectory.openInput(FSDirectory.java:324) > at org.apache.lucene.index.FieldInfos.<init>(FieldInfos.java:56) > at > org.apache.lucene.index.SegmentReader.initialize(SegmentReader.java:144) > at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:129) > at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:110) > at > org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:674) > at > org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:658) > at > org.apache.lucene.index.IndexWriter.maybeMergeSegments(IndexWriter.java:646) > at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:453) > at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:436) > at > org.sakai.search.index.impl.test.ClusterFSIndexStorageTest.loadDocument(ClusterFSIndexStorageTest.java:339) > at > org.sakai.search.index.impl.test.ClusterFSIndexStorageTest.loadDocuments(ClusterFSIndexStorageTest.java:311) > at > org.sakai.search.index.impl.test.ClusterFSIndexStorageTest.loadDocuments(ClusterFSIndexStorageTest.java:307) > at > org.sakai.search.index.impl.test.ClusterFSIndexStorageTest.loadDocuments(ClusterFSIndexStorageTest.java:307) > at > org.sakai.search.index.impl.test.ClusterFSIndexStorageTest.loadDocuments(ClusterFSIndexStorageTest.java:307) > at > org.sakai.search.index.impl.test.ClusterFSIndexStorageTest.loadDocuments(ClusterFSIndexStorageTest.java:307) > at > org.sakai.search.index.impl.test.ClusterFSIndexStorageTest.loadDocuments(ClusterFSIndexStorageTest.java:307) > at > org.sakai.search.index.impl.test.ClusterFSIndexStorageTest.loadDocuments(ClusterFSIndexStorageTest.java:307) > at > org.sakai.search.index.impl.test.ClusterFSIndexStorageTest.testXBigTest(ClusterFSIndexStorageTest.java:272) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at junit.framework.TestCase.runTest(TestCase.java:154) > at junit.framework.TestCase.runBare(TestCase.java:127) > at junit.framework.TestResult$1.protect(TestResult.java:106) > at junit.framework.TestResult.runProtected(TestResult.java:124) > at junit.framework.TestResult.run(TestResult.java:109) > at junit.framework.TestCase.run(TestCase.java:118) > at junit.framework.TestSuite.runTest(TestSuite.java:208) > at junit.framework.TestSuite.run(TestSuite.java:203) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) > I will put some more debug in maybeMergeSegments to see if I can find out why > (unless someone already knows the answer :) ) > Thanks > Ian -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]