-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Add Warning Http Header when one ore more documents fails in bulk #76216
Comments
Pinging @elastic/es-distributed (Team:Distributed) |
IMO the question of whether to add a header in this case is much more general than just for As it stands today we deliberately include status info within the first few bytes (e.g. As such I'd like the clients team to discuss this idea instead. |
An alternative idea, specifically for the |
I'm mostly interested in having the feature in the LowLevel Client, so one can use |
There's no need to change anything in Elasticsearch to solve this in the Java low-level REST client, you can just start to parse the body and stop at the |
I guess if the |
We (the @elastic/es-distributed team) discussed this today and want to propose an alternative mode(*) in which we only return the errors in all cases, because this would actually let us add some nice optimisations (data-transfer reductions) within Elasticsearch itself, and would save data transfer and client-side effort in the very common case that you only care about the errors. The main question is how to correlate the errors with the original docs, we could either pad the items array with (*) edit to add that the default behaviour would remain as it is today, clients would need to opt-in to this alternative mode |
I'm happy if the "alterntive mode" becomes available through the DotNet LowLevel-client. And I would be really happy if |
The alternative mode would certainly be available in the low-level client (you can do anything there) but I expect we'd add it to the high-level client too. I also expect that the method for checking for any errors would remain the same as it is today, but it'd be much faster since in the no-errors case the response would be tiny and therefore trivial to parse. |
Have this
BytesResponse
from a bulk-operation, whereSuccess = true
:And when checking Http-Headers then there is no "Warning" header:
Please add "Warning"-header to also signal that "One ore more items with errors", when no other "deprecated warnings". Then one can react on this and deserialize the entire response to diagnose the issue (Avoid spending time on deserializing succesful responses, when no warnings).
See also: elastic/elastic-transport-net#30
The text was updated successfully, but these errors were encountered: