-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Bulk API return document level 500 when new shards are being allocated #5565
Comments
One trouble is that we actually don't want you to retry right away in that case. Maybe we should set an informative retry_after header? (500ms maybe) |
Es clients don't always return response headers. But it's not a bad idea. Maybe in the metadata returned in the response, and header.
|
I will try to trace down how the error metadata is constructed to see if it can be influenced. |
Yeah, I don't see anything that relays response headers through the elasticsearch client libs. Thats not to say it isn't a good idea. If that kind of info can be transmitting back, its should. I think in the case of the bulk api, it would probably need to be included in the document level responses as well though. That is expected pattern for that one as its kind of a multi-response situation. |
Describe the bug
Under certain conditions using the elasticsearch _bulk api, quickwit, particularly during spikes in ingestion traffic, or when an index is initially created, quickwit will reject documents with a document level status of
500
,internal_exception
with the reasonno shards available
. This tends to indicate that something has gone wrong on the server and the document cannot be retriedThis can cause problems when using existing elasticsearch client libraries. Many of them have logic implemented for handing retires and document level errors from the bulk api. However, the rate limiting generally only kicks in when the document level status is a 429. This can be problematic for existing applications where the retry logic is leveraged. In the current quickwit behavior, documents will generally be dropped assuming the error is terminal when its really a transient warmup problem.
Expected behavior
The bulk api document errors should be a
429
when there are no shards available. It may also be helpful to return a error code that is more indicative of the problem rather than an `internal_exceptionThe text was updated successfully, but these errors were encountered: