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

The search core and the extension index don't recover when the remote Solr server cannot be reached during startup

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 12.2
    • Extension, Search - Solr
    • None
    • Unknown

    Description

      Symptom

      With a remote Solr server (solr.type=remote), when XWiki starts while the Solr server cannot be reached yet, the search index is not updated when the available locales of a wiki change, until XWiki is restarted, even when the Solr server becomes available a few seconds later. The extension index can fail in the same way while Solr is not available.

      Cause

      • The event listeners are registered once, when the observation manager is used for the first time, early in the startup. A listener which cannot be looked up at that moment is skipped for the life of the instance.
      • SolrIndexAvailableLocalesListener injects SolrInstance, whose implementation SolrClientInstance gets the search core in its initialize(). When Solr cannot be reached, the initialization fails, so does the lookup of the listener, and the listener is never registered.
      • ExtensionIndexStore also gets the extension_index core in its initialize(), so the components which inject it (DefaultExtensionIndex, the extension index job) fail while Solr cannot be reached. Whether a component keeps that failure for the life of the instance was not established.

      XWIKI-25252 fixes the same problem for the event store (the core is resolved when first needed, and again after a failure) and makes RemoteSolr itself survive a Solr server which cannot be reached at startup. The same approach can be applied to SolrClientInstance and ExtensionIndexStore.

      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: