Initialize and close index managers / backends in parallel

Description

Index manager initialization may be costly, in particular in the Elasticsearch case, and may not involve concurrent access to shared resources.

We might want to initialize index managers in parallel, in order to improve performance.
Note: this may conflict with the idea of lazy index manager initialization from HSEARCH-2339.
See org.hibernate.search.v6poc.backend.elasticsearch.index.impl.ElasticsearchIndexManagerBuilder#build.

Conversely, closing an index manager involves switching off work sinks (not accepting any more work) and then waiting for pending works to finish executing. The second part should definitely be executed in parallel for all index managers.

Environment

None

Status

Assignee

Yoann Rodière

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Fix versions

Priority

Major
Configure