See MutableFactoryTest.testMultiThreadedAddClasses, which seems to frequently fail with the stack trace below.
For now, MutableFactoryTest.testMultiThreadedAddClasses has been disabled for Elasticsearch. It should be re-enabled once this issue has been fixed.
It seems there is an issue with refreshes. In BackendRequestProcessor, we have this code:
... which totally ignores the "refresh" parameter for single requests. Since the "refresh" flag is not set by default on requests created by ElasticsearchIndexWorkVisitor.indexDocument, we probably skip some refreshes sometimes.
Note that once this is fixed, other errors seem to occur: calls to the "refresh" API that fail because of unexisting indexes... To be investigated.