You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Damiano Albani <da...@gmail.com> on 2018/06/27 08:46:24 UTC

[Oak] Locally persisted Lucene index gets corrupted

Hi,

In my setup, I have several Lucene indexes configured with
"persistence=file" to store the files locally.
For some reason, after a while creating many nodes in the repository, I
suddenly get this kind of exception:

2018-06-26 23:22:27.850  WARN 3655 --- [ex-update-async]
o.a.j.o.plugins.index.AsyncIndexUpdate   : [async] The index update failed

org.apache.jackrabbit.oak.api.CommitFailedException: OakLucene0003: Failed
to index the node /path/to/the/node
    at
org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.addOrUpdate(LuceneIndexEditor.java:262)
~[oak-lucene-1.9.4.jar:1.9.4]
    at
org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.leave(LuceneIndexEditor.java:140)
~[oak-lucene-1.9.4.jar:1.9.4]
...
Caused by: java.io.FileNotFoundException: /path/to/index/directory/_2s.si
(No such file or directory)
    at java.io.RandomAccessFile.open0(Native Method) ~[na:1.8.0_171]
    at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
~[na:1.8.0_171]
    at java.io.RandomAccessFile.<init>(RandomAccessFile.java:243)
~[na:1.8.0_171]
...

(Full stack trace as attachment.)

At the moment of this exception, here's the list of files present in this
index directory:
_2y.cfe  _2y.cfs  _2y.fdt  _2y.fdx  _2y.fnm  _2y_Lucene41_0.doc
_2y_Lucene41_0.tim  _2y_Lucene41_0.tip  _2y_Lucene45_0.dvd
_2y_Lucene45_0.dvm  _2y.si  segments_2q  segments.gen

And I can't open the index with Luke, as it also complains about a missing
"_2s.si" file.
Strangely enough, other indexes with an almost identical definition don't
end up with this problem.

So what could be reason why this particular index got corrupted?
It is always reproduceable from a brand new repository.
I'm using Oak 1.9.4 with MongoDB.

Thanks.

-- 
Damiano Albani