Lucene over Infinispan index corruption
asafz Nov 10, 2015 6:45 AMWe are using lucene over inifispan with 2 active nodes, infinispan is persistent to files.
Sometimes restarting one of the nodes causes to a lucene index corruption. we see this exception in the logs when trying to read from the index:
- java.io.FileNotFoundException: Error loading metadata for index file: _78.si|M|skywareAccountsIndex
at org.infinispan.lucene.impl.DirectoryImplementor.openInput(DirectoryImplementor.java:134)
at org.infinispan.lucene.impl.DirectoryLuceneV4.openInput(DirectoryLuceneV4.java:101)
at org.apache.lucene.store.Directory.openChecksumInput(Directory.java:113)
at org.apache.lucene.codecs.lucene46.Lucene46SegmentInfoReader.read(Lucene46SegmentInfoReader.java:49)
at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:361)
at org.apache.lucene.index.StandardDirectoryReader$1.doBody(StandardDirectoryReader.java:57)
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:907)
at org.apache.lucene.index.StandardDirectoryReader.open(StandardDirectoryReader.java:53) at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:67)
at
the infinspan configuration is:
<replicated-cache name="ACCOUNT_LUCENE_METADATA_CACHE" mode="SYNC">
<expiration interval="-1" />
<locking striping="false" />
<persistence passivation="false">
<file-store shared="false" preload="true" fetch-state="true" purge="false"
path="/var/skyfence/management/management_dbs/cache" />
</persistence>
</replicated-cache>
<replicated-cache name="ACCOUNT_LUCENE_DATA_CACHE" mode="SYNC">
<expiration interval="-1" />
<locking striping="false" />
<persistence passivation="false">
<file-store shared="false" preload="false" fetch-state="true" purge="false"
path="/var/skyfence/management/management_dbs/cache" />
</persistence>
</replicated-cache>
I understand from the lucene documentation that lucene over file-system should be fault tolerant for crashes, is that also the case for lucene over infinspan?
Any idea what are we doing wrong?