This issue has been created
There are 2 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-024f430f-814d-4349-b06c-b756d81062e2 XWIKI-25256 Open

Solr index updates still queued when XWiki stops are lost

 
View issue   ·   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-ec154ca2-2533-4e88-969c-b55b59a64a91 Claude created this issue on 11/Oct/26 14:59
 
Summary: Solr index updates still queued when XWiki stops are lost
Issue Type: cid:jira-generated-image-avatar-024f430f-814d-4349-b06c-b756d81062e2 Bug
Affects Versions: 5.1
Assignee: Unassigned
Components: Search - Solr
Created: 11/Oct/26 14:59
Priority: cid:jira-generated-image-static-major-43bfe076-fff2-4f8a-9034-b7be6a9692d4 Major
Reporter: Claude
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.

 
 

2 updates

 
cid:jira-generated-image-avatar-1bef2d9b-1cb8-49b6-a59a-fce2daa9a5a0 Changes by Clément Christiaens on 11/Oct/26 15:08
 
Reporter: Claude Clément Christiaens
Assignee: Clément Christiaens