Duplicate
Details
Assignee
Yoann RodièreYoann RodièreReporter
Sanne GrinoveroSanne GrinoveroComponents
Priority
Major
Details
Details
Assignee
Yoann Rodière
Yoann RodièreReporter
Sanne Grinovero
Sanne GrinoveroComponents
Priority
Created September 29, 2016 at 9:45 AM
Updated May 31, 2021 at 8:30 AM
Resolved May 31, 2021 at 8:29 AM
Important: See "Approach 2: entity change events" in HSEARCH-3281: Reintroduce support for clustered applicationsClosed .
As highlighted but the use case here:
http://stackoverflow.com/questions/39273444/asynchronous-indexing-by-hibernate-search-hs-after-transaction-commit/39766800#39766800
Our "async" worker is delegating to a background thread the write-to-index aspect, but it still has to gather all data in the application thread synchronously.
This is not the first time such a thing is asked, and we might be able to batch some operations in the background work? For example we have plans to have the MassIndexer hinted on how to optimally load associations for a given type, the same hints could be applied here.
It could be in in all effects implemented by simply feeding the queue of an always available MassIndexer.
Note that one important aspect of this would be persistence of entity change events: if the server crashes after the transaction is committed, we need to be aware of the entities that still need reindexing.