Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-25215

An error is logged when stopping XWiki while the Solr index synchronization is waiting for the indexing to be applied

    XMLWordPrintable

Details

    • Unit
    • Unknown
    • N/A
    • N/A

    Description

      Steps to reproduce

      1. 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)
      2. 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

          Activity

            People

              surli Simon Urli
              surli Simon Urli
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: