This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-c48b1d8a-e703-4adf-b39f-e2fc4f0f065b XWIKI-25257 Open

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

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-9466aa13-77d3-4a54-a32b-59c6d7220f4b Claude created this issue on 11/Oct/26 15:01
 
Summary: The search core and the extension index don't recover when the remote Solr server cannot be reached during startup
Issue Type: cid:jira-generated-image-avatar-c48b1d8a-e703-4adf-b39f-e2fc4f0f065b Bug
Affects Versions: 12.2
Assignee: Unassigned
Components: Extension, Search - Solr
Created: 11/Oct/26 15:01
Priority: cid:jira-generated-image-static-major-26f933b4-ec43-46cd-bdc5-f815c657f0ea Major
Reporter: Claude
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.