In synchronous mode, it seems we create one error context per (potentially bulked) Elasticsearch work: see {{org.hibernate.search.elasticsearch.processor.impl.ElasticsearchWorkProcessor.executeSafely(Iterable<ElasticsearchWork<?>>)}} and {{org.hibernate.search.elasticsearch.processor.impl.ElasticsearchWorkProcessor.executeSafely(ElasticsearchWork<?>, ElasticsearchWorkExecutionContext)}}.
We should instead create one error context per set of works that was submitted to the processor, so that the error context can also inform about which tasks were about to be executed, but will not be due to the error.
Note: we have the exact same issue when performing non-"stream" works in asynchronous mode; see https://github.com/hibernate/hibernate-search/pull/1336 /files/78a6b9c9ce5f04f9747ff09149b76457cf74e3dc # r108131923 pullrequestreview-29142895 |
|