Add a configuration option to run the MassIndexer during the initialization phase

Description

It would be useful to have an option to have the SessionFactory initialization return only after a full reindexing is completed.

This will likely be an ORM feature, and we require the SessionFactory construction to fully initialized before we can actually trigger this operation; the SearchFactory today is starting too early.

Environment

None

Activity

Show:
Hardy Ferentschik
September 27, 2013, 9:04 AM

This will likely be an ORM feature, and we require the SessionFactory construction to fully initialized before we can actually trigger this operation; the SearchFactory today is starting too early.

The starting of the session factory is fixed by HSEARCH-1366, but I am wondering whether it is really such a good idea. Would that not introduce massive delays in startup? What is the use case for this? Is this really needed for 4.4. I don't think so.

Yoann Rodière
April 1, 2020, 3:02 PM

Won't fix, for the following reasons:

  • This could introduce massive delays during startup.

  • This may not even work with some DI mechanisms (CDI in particular) if the bridges depend on an injected user service.

  • Users can easily implement this themselves as a trigger on an "application startup" event with most frameworks (CDI, Spring).

Assignee

Yoann Rodière

Reporter

Sanne Grinovero

Labels

None

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Components

Priority

Major
Configure