]
Gustavo Fernandes edited comment on ISPN-7005 at 9/7/16 6:57 AM:
-----------------------------------------------------------------
Possibly related ISPN-3432
was (Author: gustavonalle):
Possibly related
org.apache.lucene.index.IndexNotFoundException when querying
------------------------------------------------------------
Key: ISPN-7005
URL:
https://issues.jboss.org/browse/ISPN-7005
Project: Infinispan
Issue Type: Bug
Components: Embedded Querying, Lucene Directory
Affects Versions: 9.0.0.Alpha4
Reporter: Gustavo Fernandes
Assignee: Gustavo Fernandes
This happens when querying an Index stored in the Infinispan directory at the same time
writes are happening. It is very hard to reproduce, the stack trace is:
{noformat}
java.util.concurrent.CompletionException: org.hibernate.search.exception.SearchException:
HSEARCH000103: Unable to initialize IndexManager named 'entity.205'
at
java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
at
java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
at
java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1592)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.hibernate.search.exception.SearchException: HSEARCH000103: Unable to
initialize IndexManager named 'entity.205'
at
org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManager(IndexManagerHolder.java:275)
at
org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManager(IndexManagerHolder.java:528)
at
org.hibernate.search.indexes.impl.IndexManagerHolder.getOrCreateIndexManager(IndexManagerHolder.java:163)
at
org.hibernate.search.engine.impl.DynamicShardingStrategy.getIndexManagersFromShards(DynamicShardingStrategy.java:82)
at
org.hibernate.search.engine.impl.DynamicShardingStrategy.getIndexManagersForQuery(DynamicShardingStrategy.java:71)
at
org.hibernate.search.query.engine.impl.LuceneHSQuery.getIndexManagers(LuceneHSQuery.java:611)
at
org.hibernate.search.query.engine.impl.LuceneHSQuery.buildSearcher(LuceneHSQuery.java:447)
at
org.hibernate.search.query.engine.impl.LuceneHSQuery.buildSearcher(LuceneHSQuery.java:380)
at
org.hibernate.search.query.engine.impl.LuceneHSQuery.queryEntityInfos(LuceneHSQuery.java:138)
at org.infinispan.query.impl.CacheQueryImpl.list(CacheQueryImpl.java:161)
at
org.infinispan.query.affinity.AffinityTopologyChangeTest$QueryingNode.executeTask(AffinityTopologyChangeTest.java:164)
at
org.infinispan.query.affinity.AffinityTopologyChangeTest$TaskNode.lambda$null$0(AffinityTopologyChangeTest.java:129)
at
java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
... 3 more
Caused by: org.hibernate.search.exception.SearchException: Unable to open Lucene
IndexReader for IndexManager entity.205
at
org.hibernate.search.indexes.impl.SharingBufferReaderProvider.createReader(SharingBufferReaderProvider.java:113)
at
org.hibernate.search.indexes.impl.SharingBufferReaderProvider.initialize(SharingBufferReaderProvider.java:91)
at
org.hibernate.search.indexes.impl.PropertiesParseHelper.createDirectoryBasedReaderProvider(PropertiesParseHelper.java:172)
at
org.hibernate.search.indexes.spi.DirectoryBasedIndexManager.createIndexReader(DirectoryBasedIndexManager.java:208)
at
org.hibernate.search.indexes.spi.DirectoryBasedIndexManager.initialize(DirectoryBasedIndexManager.java:87)
at
org.infinispan.query.affinity.AffinityIndexManager.initialize(AffinityIndexManager.java:139)
at
org.hibernate.search.indexes.impl.IndexManagerHolder.createIndexManager(IndexManagerHolder.java:271)
... 15 more
Caused by: org.apache.lucene.index.IndexNotFoundException: no segments* file found in
InfinispanDirectory{indexName='entity.205'}: files: [_0.cfe, _0.cfs, _0.si,
pending_segments_2]
at
org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:726)
at
org.apache.lucene.index.StandardDirectoryReader.open(StandardDirectoryReader.java:50)
at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:63)
at
org.hibernate.search.indexes.impl.SharingBufferReaderProvider.readerFactory(SharingBufferReaderProvider.java:131)
at
org.hibernate.search.indexes.impl.SharingBufferReaderProvider$PerDirectoryLatestReader.<init>(SharingBufferReaderProvider.java:206)
at
org.hibernate.search.indexes.impl.SharingBufferReaderProvider.createReader(SharingBufferReaderProvider.java:108)
... 21 more
{noformat}