Details
-
Bug
-
Resolution: Fixed
-
Minor
-
17.8.0
-
Unit
-
Unknown
-
N/A
-
N/A
-
Description
Steps to reproduce
- Start XWiki on a wiki large enough for the Solr index synchronization executed at startup to take some time (or with an empty Solr index)
- Stop XWiki while that synchronization is still running
Expected
XWiki stops without error. The synchronization is interrupted and is executed again at the next startup.
Actual
The following error is logged while stopping:
ERROR o.x.s.s.i.j.IndexerJob - Exception thrown during job execution java.util.concurrent.ExecutionException: org.xwiki.index.IndexException: Indexing stopped. at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396) at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073) at org.xwiki.search.solr.internal.job.IndexerJob.updateSolrIndex(IndexerJob.java:196) at org.xwiki.search.solr.internal.job.IndexerJob.updateSolrIndex(IndexerJob.java:146) at org.xwiki.search.solr.internal.job.IndexerJob.runInternal(IndexerJob.java:122) at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:250) at org.xwiki.job.AbstractJob.run(AbstractJob.java:227) Caused by: org.xwiki.index.IndexException: Indexing stopped. at org.xwiki.search.solr.internal.DefaultSolrIndexer.stopIndexerThread(DefaultSolrIndexer.java:507)
Cause
Since XWIKI-15166, the indexer job waits for the indexing to be applied (this.indexer.waitReady().get()) before removing the invalid entries. When XWiki stops, DefaultSolrIndexer completes all the pending waitReady() futures with IndexException("Indexing stopped.") (since XWIKI-22323), which the job propagates as a failure.
This is visible on the functional tests which stop XWiki soon after startup, e.g. SuggestTest (distribution flavor misc tests) and the distribution flavor storage tests.
Attachments
Issue Links
- is related to
-
XWIKI-22323 Refactoring operation should wait for the Solr index to be empty before proceeding
-
- Closed
-
-
XWIKI-15166 SOLR reindexation job cause serious perfomance issues on large database
-
- Closed
-