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

Solr index updates still queued when XWiki stops are lost

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 5.1
    • Search - Solr
    • None
    • Unknown

    Description

      Problem

      The Solr indexer keeps the entities waiting to be indexed in two in-memory queues (the resolve queue and the index queue). When XWiki stops, DefaultSolrIndexer#dispose() clears both queues without processing them, so every change saved shortly before the stop is missing from the Solr index: the documents, objects, object properties and attachments of the last saves, and also what a job finishing during the shutdown produced.

      The index synchronization only partly repairs it:

      • it runs only at startup on an instance with solr.synchronizeAtStartup=true (or when an administrator starts it);
      • it compares only the version of the document rows and re-indexes the documents whose version differs, so a lost update of an object, an object property or an attachment whose document row was already indexed is never repaired;
      • a lost deletion of an object or an attachment leaves an orphan row in the index (see XWIKI-22949).

      In a cluster sharing a remote Solr server, the other members no longer index the changes of the member that stops (XWIKI-25255), so they do not hide this loss any more.

      Expected

      When XWiki stops, the indexer processes what is already queued before stopping, bounded by a timeout, while the document store and the Solr client are still available (the indexer is disposed with priority 500; the Solr clients and the database store must stay usable until it is done). What is left after the timeout is logged.

      Attachments

        Issue Links

          Activity

            People

              ciaens Clément Christiaens
              ciaens Clément Christiaens
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: