race condition in index closing

Description

Race condition on index closing, seeing:

Exception in thread "DefaultReaderCache-zoie-indexReader-maintenance"
java.lang.AssertionError
Exception in thread "DefaultReaderCache-zoie-indexReader-maintenance"
at org.apache.lucene.index.IndexReader.incRef(IndexReader.java:143)
at proj.zoie.api.ZoieMultiReader.copy(ZoieMultiReader.java:358)
at proj.zoie.api.ZoieMultiReader.copy(ZoieMultiReader.java:38)
at
proj.zoie.impl.indexing.internal.SearchIndexManager.getIndexReaders(SearchIndexManager.java:244)
at
proj.zoie.impl.indexing.DefaultReaderCache$MaintenanceThread.run(DefaultReaderCache.java:149)
java.lang.AssertionError
at org.apache.lucene.index.IndexReader.incRef(IndexReader.java:143)
at proj.zoie.api.ZoieMultiReader.copy(ZoieMultiReader.java:358)
at proj.zoie.api.ZoieMultiReader.copy(ZoieMultiReader.java:38)
at
proj.zoie.impl.indexing.internal.SearchIndexManager.getIndexReaders(SearchIndexManager.java:244)
at
proj.zoie.impl.indexing.DefaultReaderCache$MaintenanceThread.run(DefaultReaderCache.java:149)

Environment

None

Status

Assignee

John Wang

Reporter

Lei Wang

Labels

None

Components

Fix versions

Priority

Major
Configure