-
Notifications
You must be signed in to change notification settings - Fork 89
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
feat: better error handling from server bulk response. #149
Conversation
What is the performance overhead from using NEST BulkResponse ? (Prefer to optimize for success instead of error) Would it not be possible to extract the same information from the I guess it would make sense to stop using the LowLevel-Client and instead, change over to the NEST-interface. Since the LowLevel-Serializer fails to handle anything but simple data-types. |
I have run some benchmarks and found no real overhead for using the |
Amazing how sending 100 messages cost 2 MByte allocation. Also strange that Have created the following issue elastic/elastic-transport-net#30 |
FYI: 1000 messages will cost 15Mbytes |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
activate |
@lucianaparaschivei Possible that the last commit |
Sure, i added it by mistake. |
980f00d
to
cb9528e
Compare
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
In some cases the
BytesResponse
flag Success is not enough to identify a failed index operation. We should rely on theBulkResponse
that returns the items with errors.For example this will not log anything in the internal logger with the current approach:
Successful (200) low level call on POST: /_bulk {"took":0,"errors":true,"items":[{"index":{"_index":"logstash-2021.07.12","_type":"_doc","_id":"OTgmmnoBq3Eup03vE24t","status":403,"error":{"type":"security_exception","reason":"action [indices:data/write/bulk[s]] is unauthorized for API key id [NzgjmnoBq3Eup03vg25H] of user [elastic] on indices [logstash-2021.07.12], this action is granted by the index privileges [create_doc,create,delete,index,write,all]"}
But the
BulkResponse
has theErrors
flag and will include in this case the failed item in theItemsWithErrors
collection.Checklist