lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From superruiye <superru...@gmail.com>
Subject Re: "read past EOF" when merge
Date Wed, 07 Nov 2012 09:46:28 GMT
Sorry,I can't reproduce in local...

"If at any time you accidentally had two writers open on the same
index, it could have created this corruption. "

I use singleton to create/get IndexWriter ,and change LockFactory to
SimpleFSLockFactory (NativeFSLockFactory before) .Maybe a long time it was
running well ,but the exception still appeared.

I was so strange that the Index A running well about half year with
NativeFSLockFactory ,and in a new project version , I reindexed all old data
to a Index A_new with old code ,and add a new data to Index (B) with a
LuceneUtil I encapsulate ,the problem came.
The new project version was run about a week,both Index (A_new and B)
appeared the Exception .You suggest me
1. CheckIndex
2. SimpleFSLockFactory instead
and now, Index A_new still well ,but Index B was problematic,even  unable to
write index.

Exception in thread "Lucene Merge Thread #241"
org.apache.lucene.index.MergePolicy$MergeException: java.io.IOException:
read past EOF
        at
org.apache.lucene.index.ConcurrentMergeScheduler.handleMergeException(ConcurrentMergeScheduler.java:517)
        at
org.apache.lucene.index.ConcurrentMergeScheduler$MergeThread.run(ConcurrentMergeScheduler.java:482)
Caused by: java.io.IOException: read past EOF
        at
org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:207)
        at
org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:39)
        at org.apache.lucene.store.DataInput.readVInt(DataInput.java:105)
        at
org.apache.lucene.store.BufferedIndexInput.readVInt(BufferedIndexInput.java:181)
        at
org.apache.lucene.index.SegmentTermPositions.readDeltaPosition(SegmentTermPositions.java:76)
        at
org.apache.lucene.index.SegmentTermPositions.nextPosition(SegmentTermPositions.java:72)
        at
org.apache.lucene.index.SegmentMerger.appendPostings(SegmentMerger.java:594)
        at
org.apache.lucene.index.SegmentMerger.mergeTermInfos(SegmentMerger.java:538)
        at
org.apache.lucene.index.SegmentMerger.mergeTerms(SegmentMerger.java:470)
        at
org.apache.lucene.index.SegmentMerger.merge(SegmentMerger.java:109)
        at
org.apache.lucene.index.IndexWriter.mergeMiddle(IndexWriter.java:4273)
        at org.apache.lucene.index.IndexWriter.merge(IndexWriter.java:3917)
        at
org.apache.lucene.index.ConcurrentMergeScheduler.doMerge(ConcurrentMergeScheduler.java:388)
        at
org.apache.lucene.index.ConcurrentMergeScheduler$MergeThread.run(ConcurrentMergeScheduler.java:456)
2012-11-07 04:10:18,400  INFO
SID=30C3A969633B1781AC22C1912E5109B8.se3mbe0.bp1, SN=48, ip=xxxxxxxx,
ref=null, req=xxxxxxxxx
java.io.IOException: read past EOF
        at
org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:207)
        at
org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:39)
        at org.apache.lucene.store.DataInput.readInt(DataInput.java:84)
        at
org.apache.lucene.store.BufferedIndexInput.readInt(BufferedIndexInput.java:153)
        at
org.apache.lucene.index.SegmentTermEnum.<init>(SegmentTermEnum.java:50)
        at
org.apache.lucene.index.TermInfosReader.<init>(TermInfosReader.java:112)
        at
org.apache.lucene.index.SegmentCoreReaders.<init>(SegmentCoreReaders.java:76)
        at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:115)
        at
org.apache.lucene.index.IndexWriter$ReaderPool.get(IndexWriter.java:710)
        at
org.apache.lucene.index.IndexWriter$ReaderPool.get(IndexWriter.java:685)
        at
org.apache.lucene.index.BufferedDeletesStream.applyDeletes(BufferedDeletesStream.java:201)
        at
org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:3628)
        at
org.apache.lucene.index.IndexWriter.prepareCommit(IndexWriter.java:3394)
        at
org.apache.lucene.index.IndexWriter.commitInternal(IndexWriter.java:3501)
        at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:3483)
        at org.apache.lucene.index.IndexWriter.commit(IndexWriter.java:3467)
        at
com.ablesky.asene.core.MulIndexManager.index(MulIndexManager.java:84)
        at com.ablesky.asene.core.AseneFacade.index(AseneFacade.java:71)
        at
com.ableskysearch.migration.service.asene.studyhistory.impl.StudyHistoryAseneServiceImpl.indexStudyHistory(StudyHistoryAseneServiceImpl.java:410)
        at
com.ableskysearch.migration.timertask.StudyHistoryAseneIndexTask.process(StudyHistoryAseneIndexTask.java:93)
        at
com.ableskysearch.migration.timertask.StudyHistoryAseneIndexTask.runAsPeriod(StudyHistoryAseneIndexTask.java:54)
        at sun.reflect.GeneratedMethodAccessor714.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
com.ableskysearch.migration.timertask.OpenSessionHandler.invoke(OpenSessionHandler.java:40)
        at $Proxy42.runAsPeriod(Unknown Source)
        at
com.ableskysearch.migration.timertask.AutoStudyHistoryAseneIndexTask.run(AutoStudyHistoryAseneIndexTask.java:49)
        at sun.reflect.GeneratedMethodAccessor734.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:276)
        at
org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:260)
        at
org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)


so I CheckIndex B , it become well...




--
View this message in context: http://lucene.472066.n3.nabble.com/read-past-EOF-when-merge-tp4017179p4018681.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


Mime
View raw message