-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BulkIngester close() does not wait for listener to finish #559
Comments
@swallez any ideas on this one? |
+1 I have a scenario where I need to use the BulkIngester to handle retries, metrics, etc., but I want to have control over when the request is sent so that I can rollback the distributed operation in case of failure. My idea was to just set the maximum size/number of requests to The problem is that there is no way to know if the operation succeeded or not, since the listener's
I have no way to synchronise the call on my scenario, where I want to throw an exception synchronously when If we could return the |
This might be fixed with #867 |
Java API client version
7.17.9 and 7.17.10-SNAPSHOT
Java version
java 19
Elasticsearch Version
7.17.9
Problem description
When using the BulkIngester with a BulkListener then calling the close() on the BulkIngester returns before all afterBulk() BulkListener callbacks are finished. Below is a snippet of code that uses the BulkIngester. If you simply add a few logging statements after the close() and in the afterBulk() you will see that the afterBulk() callbacks are still busy after the close() returns.
That should not be the case. On return of the close() call the bulk should have been handled completely.
Thanks for looking into the problem.
``
The text was updated successfully, but these errors were encountered: