lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: FileNotFoundException during indexing
Date Fri, 01 Aug 2008 12:35:51 GMT

Hmmm OK.  I would stick with the NativeFSLockFactory, and never call  
IndexReader.unlock.

Can you call IndexWriter.setInfoStream, and then post the resulting  
log?  It may provide clues of what's happening.

Also, if you can narrow this to a small test case that shows the  
exception, that'd be very helpful.

Mike

Wojtek212 wrote:

>
> I've checked unlock and it is not called until exception occurs.
>
> BTW, I' ve tried to use FSDirectorectory with NativeFSLockFactory  
> and I
> didn't get
> LockObtainFailedException. I removed also this part making unlocking
> (IndexReader.unlock).
>
> The exception is:
> Exception in thread "Thread-95"
> org.apache.lucene.index.MergePolicy$MergeException:
> java.io.FileNotFoundException: /tmp/content/3615.0-3618.0/_5.cfs (No  
> such
> file or directory)
>        at
> org.apache.lucene.index.ConcurrentMergeScheduler 
> $MergeThread.run(ConcurrentMergeScheduler.java:271)
> Caused by: java.io.FileNotFoundException: /tmp/content/3615.0-3618.0/ 
> _5.cfs
> (No such file or directory)
>        at java.io.RandomAccessFile.open(Native Method)
>        at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
>        at
> org.apache.lucene.store.FSDirectory$FSIndexInput 
> $Descriptor.<init>(FSDirectory.java:506)
>        at
> org.apache.lucene.store.FSDirectory 
> $FSIndexInput.<init>(FSDirectory.java:536)
>        at
> org.apache.lucene.store.FSDirectory.openInput(FSDirectory.java:445)
>        at
> org 
> .apache 
> .lucene.index.CompoundFileReader.<init>(CompoundFileReader.java:70)
>        at
> org.apache.lucene.index.SegmentReader.initialize(SegmentReader.java: 
> 277)
>        at  
> org.apache.lucene.index.SegmentReader.get(SegmentReader.java:262)
>        at  
> org.apache.lucene.index.SegmentReader.get(SegmentReader.java:221)
>        at
> org.apache.lucene.index.IndexWriter.mergeMiddle(IndexWriter.java:3263)
>        at org.apache.lucene.index.IndexWriter.merge(IndexWriter.java: 
> 2968)
>        at
> org.apache.lucene.index.ConcurrentMergeScheduler 
> $MergeThread.run(ConcurrentMergeScheduler.java:240)
> Exception in thread "Thread-82" java.lang.RuntimeException:
> com.testt.search.IndexingException: java.io.IOException: background  
> merge
> hit exception: _5:c27 _6:c1 into _7 [optimize]
>        at
> com.test.vcssearch.DefaultServiceIndexer 
> $2.run(DefaultServiceIndexer.java:245)
>        at java.lang.Thread.run(Thread.java:595)
> Caused by: com.test.search.IndexingException: java.io.IOException:
> background merge hit exception: _5:c27 _6:c1 into _7 [optimize]
>        at
> com 
> .test 
> .search 
> .impl 
> .lucene.LuceneIndexManager.removeDocuments(LuceneIndexManager.java: 
> 324)
>        at
> com 
> .test 
> .search 
> .impl 
> .lucene.LuceneIndexManager.removeDocuments(LuceneIndexManager.java: 
> 208)
>        at
> com 
> .test 
> .search 
> .impl.lucene.LuceneIndexManager.reindex(LuceneIndexManager.java:271)
>        at
> com 
> .test 
> .search 
> .impl.lucene.LuceneIndexManager.reindex(LuceneIndexManager.java:332)
>        at
> com.test.vcssearch.DefaultServiceIndexer 
> $2.run(DefaultServiceIndexer.java:239)
>        ... 1 more
> Caused by: java.io.IOException: background merge hit exception:  
> _5:c27 _6:c1
> into _7 [optimize]
>        at
> org.apache.lucene.index.IndexWriter.optimize(IndexWriter.java:1787)
>        at
> org.apache.lucene.index.IndexWriter.optimize(IndexWriter.java:1727)
>        at
> org.apache.lucene.index.IndexWriter.optimize(IndexWriter.java:1707)
>        at
> com 
> .test 
> .search 
> .impl 
> .lucene.LuceneIndexManager.removeDocuments(LuceneIndexManager.java: 
> 310)
>        ... 5 more
> Caused by: java.io.FileNotFoundException: /tmp/content/3615.0-3618.0/ 
> _5.cfs
> (No such file or directory)
>        at java.io.RandomAccessFile.open(Native Method)
>        at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
>        at
> org.apache.lucene.store.FSDirectory$FSIndexInput 
> $Descriptor.<init>(FSDirectory.java:506)
>        at
> org.apache.lucene.store.FSDirectory 
> $FSIndexInput.<init>(FSDirectory.java:536)
>        at
> org.apache.lucene.store.FSDirectory.openInput(FSDirectory.java:445)
>        at
> org 
> .apache 
> .lucene.index.CompoundFileReader.<init>(CompoundFileReader.java:70)
>        at
> org.apache.lucene.index.SegmentReader.initialize(SegmentReader.java: 
> 277)
>        at  
> org.apache.lucene.index.SegmentReader.get(SegmentReader.java:262)
>        at  
> org.apache.lucene.index.SegmentReader.get(SegmentReader.java:221)
>        at
> org.apache.lucene.index.IndexWriter.mergeMiddle(IndexWriter.java:3263)
>        at org.apache.lucene.index.IndexWriter.merge(IndexWriter.java: 
> 2968)
>        at
> org.apache.lucene.index.ConcurrentMergeScheduler 
> $MergeThread.run(ConcurrentMergeScheduler.java:240)
>
>
> So if the LockObtainFailedException doesn't occur may I assume that  
> there
> are not 2 indexers writing at the same time? Mike, what do you think?
> Above test was made on lucene 2.3.2.
> -- 
> View this message in context: http://www.nabble.com/FileNotFoundException-during-indexing-tp18766343p18772749.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


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


Mime
View raw message