]
Dan Berindei updated ISPN-9890:
-------------------------------
Status: Open (was: New)
Query doesn't stop properly after index data loss
-------------------------------------------------
Key: ISPN-9890
URL:
https://issues.jboss.org/browse/ISPN-9890
Project: Infinispan
Issue Type: Bug
Components: Embedded Querying
Affects Versions: 10.0.0.Alpha2, 9.4.5.Final
Reporter: Dan Berindei
Priority: Major
Fix For: 10.0.0.Beta1
When index cache entries are lost (e.g. because a test didn't override
{{clearContent()}} to clear the indexes properly before stopping the manager), the query
module throws an exception during stop:
{noformat}
18:41:36,669 ERROR (testng-Test) [ComponentRegistry] ISPN000538: Error stopping module
org.infinispan.query.impl.LifecycleManager:___defaultcache
java.lang.AssertionError: file _0.cfe does not exist; files=[]
at org.apache.lucene.index.IndexWriter.filesExist(IndexWriter.java:4338)
~[lucene-core-5.5.5.jar:5.5.5 b3441673c21c83762035dc21d3827ad16aa17b68 - sarowe -
2017-10-20 08:57:09]
at org.apache.lucene.index.IndexWriter.startCommit(IndexWriter.java:4409)
~[lucene-core-5.5.5.jar:5.5.5 b3441673c21c83762035dc21d3827ad16aa17b68 - sarowe -
2017-10-20 08:57:09]
at org.apache.lucene.index.IndexWriter.prepareCommitInternal(IndexWriter.java:2865)
~[lucene-core-5.5.5.jar:5.5.5 b3441673c21c83762035dc21d3827ad16aa17b68 - sarowe -
2017-10-20 08:57:09]
at org.apache.lucene.index.IndexWriter.commitInternal(IndexWriter.java:2970)
~[lucene-core-5.5.5.jar:5.5.5 b3441673c21c83762035dc21d3827ad16aa17b68 - sarowe -
2017-10-20 08:57:09]
at org.apache.lucene.index.IndexWriter.shutdown(IndexWriter.java:1082)
~[lucene-core-5.5.5.jar:5.5.5 b3441673c21c83762035dc21d3827ad16aa17b68 - sarowe -
2017-10-20 08:57:09]
at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1125)
~[lucene-core-5.5.5.jar:5.5.5 b3441673c21c83762035dc21d3827ad16aa17b68 - sarowe -
2017-10-20 08:57:09]
at
org.hibernate.search.backend.impl.lucene.IndexWriterHolder.closeIndexWriter(IndexWriterHolder.java:173)
~[hibernate-search-engine-5.10.3.Final.jar:5.10.3.Final]
at
org.hibernate.search.backend.impl.lucene.AbstractWorkspaceImpl.closeIndexWriter(AbstractWorkspaceImpl.java:109)
~[hibernate-search-engine-5.10.3.Final.jar:5.10.3.Final]
at
org.hibernate.search.backend.impl.lucene.AbstractWorkspaceImpl.shutDownNow(AbstractWorkspaceImpl.java:104)
~[hibernate-search-engine-5.10.3.Final.jar:5.10.3.Final]
at
org.hibernate.search.backend.impl.lucene.LuceneBackendResources.shutdown(LuceneBackendResources.java:103)
~[hibernate-search-engine-5.10.3.Final.jar:5.10.3.Final]
at
org.hibernate.search.backend.impl.lucene.WorkspaceHolder.close(WorkspaceHolder.java:68)
~[hibernate-search-engine-5.10.3.Final.jar:5.10.3.Final]
at org.hibernate.search.util.impl.Closer.push(Closer.java:92)
~[hibernate-search-engine-5.10.3.Final.jar:5.10.3.Final]
at org.hibernate.search.util.impl.Closer.push(Closer.java:107)
~[hibernate-search-engine-5.10.3.Final.jar:5.10.3.Final]
at
org.hibernate.search.indexes.spi.DirectoryBasedIndexManager.destroy(DirectoryBasedIndexManager.java:76)
~[hibernate-search-engine-5.10.3.Final.jar:5.10.3.Final]
at
org.hibernate.search.indexes.impl.IndexManagerGroupHolder.close(IndexManagerGroupHolder.java:80)
~[hibernate-search-engine-5.10.3.Final.jar:5.10.3.Final]
at org.hibernate.search.util.impl.Closer.push(Closer.java:92)
~[hibernate-search-engine-5.10.3.Final.jar:5.10.3.Final]
at org.hibernate.search.util.impl.Closer.pushAll(Closer.java:120)
~[hibernate-search-engine-5.10.3.Final.jar:5.10.3.Final]
at
org.hibernate.search.indexes.impl.IndexManagerHolder.stop(IndexManagerHolder.java:186)
~[hibernate-search-engine-5.10.3.Final.jar:5.10.3.Final]
at org.hibernate.search.util.impl.Closer.push(Closer.java:92)
~[hibernate-search-engine-5.10.3.Final.jar:5.10.3.Final]
at org.hibernate.search.util.impl.Closer.push(Closer.java:107)
~[hibernate-search-engine-5.10.3.Final.jar:5.10.3.Final]
at
org.hibernate.search.engine.impl.ImmutableSearchFactory.close(ImmutableSearchFactory.java:268)
~[hibernate-search-engine-5.10.3.Final.jar:5.10.3.Final]
at
org.hibernate.search.engine.impl.MutableSearchFactory.close(MutableSearchFactory.java:133)
~[hibernate-search-engine-5.10.3.Final.jar:5.10.3.Final]
at org.infinispan.query.impl.LifecycleManager.cacheStopping(LifecycleManager.java:411)
~[classes/:?]
at org.infinispan.factories.ComponentRegistry.preStop(ComponentRegistry.java:200)
[classes/:?]
at
org.infinispan.factories.AbstractComponentRegistry.stop(AbstractComponentRegistry.java:373)
[classes/:?]
at org.infinispan.cache.impl.CacheImpl.performImmediateShutdown(CacheImpl.java:1159)
[classes/:?]
at org.infinispan.cache.impl.CacheImpl.stop(CacheImpl.java:1124) [classes/:?]
at
org.infinispan.cache.impl.AbstractDelegatingCache.stop(AbstractDelegatingCache.java:520)
[classes/:?]
at
org.infinispan.cache.impl.AbstractDelegatingCache.stop(AbstractDelegatingCache.java:520)
[classes/:?]
at
org.infinispan.cache.impl.AbstractDelegatingCache.stop(AbstractDelegatingCache.java:520)
[classes/:?]
at org.infinispan.manager.DefaultCacheManager.terminate(DefaultCacheManager.java:734)
[classes/:?]
at org.infinispan.manager.DefaultCacheManager.stopCaches(DefaultCacheManager.java:786)
[classes/:?]
at org.infinispan.manager.DefaultCacheManager.stop(DefaultCacheManager.java:762)
[classes/:?]
at org.infinispan.test.TestingUtil.killCacheManagers(TestingUtil.java:847)
[test-classes/:?]
at
org.infinispan.test.MultipleCacheManagersTest.clearContent(MultipleCacheManagersTest.java:158)
[test-classes/:?]
{noformat}
When this exception appears, all but the first {{SyncWorkProcessor}} threads are leaked.
Interesting enough, in {{ClusteredCachePerfIspnTest}} the exception is only thrown when
stopping node B -- node A stops cleanly and all {{SyncWorkProcessor}} threads are stopped.