-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix #3404 bulk all improvements #3405
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
Conversation
…ncountered. Now defaults to halting the BulkAll which is a saner default
…ptionally bails out early
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Add more explicit support for what to do when dropped documents are encountered. Now defaults to halting the BulkAll which is a saner default * fix audit reporting negative durations * Add FailedOverOnAllNodes audit event * BulkAll now handles bad responses from the _bulk itself as well and optionally bails out early * Fixed tests now excepting FailedOverAllNodes * ContinueAfterDroppedDocuments should not be tested for nullable arg in the code standards test (cherry picked from commit ec5ef6f)
* Add more explicit support for what to do when dropped documents are encountered. Now defaults to halting the BulkAll which is a saner default * fix audit reporting negative durations * Add FailedOverOnAllNodes audit event * BulkAll now handles bad responses from the _bulk itself as well and optionally bails out early * Fixed tests now excepting FailedOverAllNodes * ContinueAfterDroppedDocuments should not be tested for nullable arg in the code standards test (cherry picked from commit ec5ef6f)
backported to |
Introduces a couple of adjustments, the predicate was checking Another change is that the This change is now in |
The current
BulkAll()
implementation was written to steamroll its way to completion. This leads to a lot of unnecessary request in the case where most documents are expected to fail e.g due to a bad mapping.This assumption is not clear from the contract nor our docs hence the bug label.
This PR halts
BulkAll()
if any documents with errors are returned that can not be retried.It also halts or retries based on the
_bulk
requests status itself.It introduces a more explicit
FailedOverAllNodes
audit event which currently bubbles out as aMaxRetries
only.Finally you can opt in to the streamroll by setting
ContinueAfterDroppedDocuments
to true which will feed all documents it can not retry to an optionalDroppedDocumentCallback
which can put it in a DLQ for instance.