This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-78ee50b0-51b9-46e4-bcdc-846edc113dea XWIKI-25254 Open

Synchronize the Solr index at startup on a single cluster member when using a remote Solr

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-c86d7b60-62bd-4d20-a9fe-b8d7109f89c9 Claude created this issue on 11/Oct/26 14:32
 
Summary: Synchronize the Solr index at startup on a single cluster member when using a remote Solr
Issue Type: cid:jira-generated-image-avatar-78ee50b0-51b9-46e4-bcdc-846edc113dea Improvement
Affects Versions: 5.1
Assignee: Unassigned
Components: Search - Solr
Created: 11/Oct/26 14:32
Priority: cid:jira-generated-image-static-major-7791421c-ff66-4ecd-abca-b1da5e5e7c92 Major
Reporter: Claude
Description:

Problem

When several XWiki instances share a remote Solr server (solr.type=remote), every member that starts runs the Solr index synchronization (solr.synchronizeAtStartup, enabled by default). Each synchronization compares the whole database with the whole shared index, so members starting at the same time index the same differences several times and race on the removal of invalid entries, and a rolling restart repeats the full comparison once per member. The only workaround today is to disable solr.synchronizeAtStartup on all members but one, which means that nothing synchronizes the index while that member is down.

Proposal

With a remote Solr server, the startup synchronization runs only on the cluster singleton node (XWIKI-25253), and a member that becomes the singleton node (for example because the previous one stopped or crashed) runs one catch-up synchronization of all the wikis.

  • With the embedded Solr server (one index per member) nothing changes: each member keeps synchronizing its own index.
  • solr.synchronizeAtStartup=false keeps disabling the synchronization on the member where it is set.
  • In WIKI mode (solr.synchronizeAtStartupMode=WIKI), the singleton node synchronizes every wiki at startup instead of waiting for each wiki to be loaded, because a member that serves no request (a member dedicated to background work, for example) may never load the subwikis.