Hello,
I got an index corruption in production, and was wondering if it might be a
known bug (still with Lucene 3.1), or is my code doing something wrong.
It's a local disk index. No known machine power lose. No suppose to even
happen, right?

This index that got corrupted is updated every 30sec; adding to it a small
delta's index (using addIndexes()) that was replicated from another machine.
The series of writer actions to update the index is:
1. writer.deleteDocuments(q);
2. writer.flush(false, true);
3. writer.addIndexes(reader);
4. writer.commit(map);

Is the index exposed to corruptions only during commit, or is addIndexes()
risky by itself (doc says it's not).
LUCENE-2610 <https://issues.apache.org/jira/browse/LUCENE-2610> kind of
looks in the neberhood, though it's not a bug report.
I'll add an ls -l output in a follow up email.

Technically the first indication of problems is when calling flush, but it
could be that the previous writer action left it broken for flush to fail.
My stack trace is:
Caused by: java.io.FileNotFoundException:
/disks/data1/opt/WAS/LotusConnections/Data/catalog/index/Places/index/_33gg.cfs
(No such file or directory)
    at java.io.RandomAccessFile.open(Native Method)
    at java.io.RandomAccessFile.<init>(RandomAccessFile.java:233)
    at
org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput$Descriptor.<init>(SimpleFSDirectory.java:69)
    at
org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput.<init>(SimpleFSDirectory.java:90)
    at
org.apache.lucene.store.NIOFSDirectory$NIOFSIndexInput.<init>(NIOFSDirectory.java:91)
    at
org.apache.lucene.store.NIOFSDirectory.openInput(NIOFSDirectory.java:78)
    at
org.apache.lucene.index.CompoundFileReader.<init>(CompoundFileReader.java:66)
    at
org.apache.lucene.index.SegmentReader$CoreReaders.<init>(SegmentReader.java:113)
    at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:578)
    at
org.apache.lucene.index.IndexWriter$ReaderPool.get(IndexWriter.java:684)
    at
org.apache.lucene.index.IndexWriter$ReaderPool.get(IndexWriter.java:659)
    at
org.apache.lucene.index.BufferedDeletes.applyDeletes(BufferedDeletes.java:283)
    at
org.apache.lucene.index.BufferedDeletes.applyDeletes(BufferedDeletes.java:191)
    at org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:3358)
    at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:3296)

Reply via email to