Skip to content

Conversation

@Mpdreamz
Copy link
Member

@Mpdreamz Mpdreamz commented Aug 9, 2019

This PR fixes a bug and improves the run time behaviour of BulkAll()

  • If the _bulk operation itself keeps returning an invalid status code the BulkAll() could potentially hang, As reported on Check backOffRetries before retrying in HandleBulkRequest #3954 This is rare since _bulk tends to return 200 even if all items fail but a problem nonetheless.

  • ForEachAsync() should bail out after receiving a faulted task. This was preventing exceptions thrown from halting the BulkAll() in a controlled fashion.

  • Added a callback for every BulkResponse received. OnNext() is for being notified when a batch succeeded but that might constitute multiple Bulk() calls.

Copy link
Contributor

@codebrain codebrain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@codebrain codebrain merged commit d31d38a into master Aug 12, 2019
codebrain pushed a commit that referenced this pull request Aug 12, 2019
…equest keeps returning a bad statuscode (#4014)

Ensure BulkAll() is aborted properly if the whole bulk request keeps returning a bad statuscode.
@codebrain
Copy link
Contributor

Ported to 7.x branch.

codebrain pushed a commit that referenced this pull request Aug 12, 2019
…equest keeps returning a bad statuscode (#4014)

Ensure BulkAll() is aborted properly if the whole bulk request keeps returning a bad statuscode.
@russcam
Copy link
Contributor

russcam commented Aug 13, 2019

ported to 6.x

russcam pushed a commit that referenced this pull request Aug 13, 2019
…equest keeps returning a bad statuscode (#4014)

Ensure BulkAll() is aborted properly if the whole bulk request keeps returning a bad statuscode.

(cherry picked from commit c0293a0)
@russcam russcam removed the Feature label Aug 15, 2019
@russcam russcam deleted the fix/master/bulk-all-improvements branch September 1, 2019 22:41
rmadisonhaynie added a commit to rmadisonhaynie/elasticsearch-net that referenced this pull request Nov 6, 2020
Ensure BulkAll() is aborted properly if the whole bulk request keeps returning a bad statuscode and ContinueOnDroppedDocuments is true. This was introduced in elastic#4014 when trying to address a similar issue with backOffTries being ignored.
stevejgordon pushed a commit that referenced this pull request Nov 12, 2020
Ensure BulkAll() is aborted properly if the whole bulk request keeps returning a bad statuscode and ContinueOnDroppedDocuments is true. This was introduced in #4014 when trying to address a similar issue with backOffTries being ignored.
stevejgordon pushed a commit that referenced this pull request Nov 12, 2020
Ensure BulkAll() is aborted properly if the whole bulk request keeps returning a bad statuscode and ContinueOnDroppedDocuments is true. This was introduced in #4014 when trying to address a similar issue with backOffTries being ignored.
stevejgordon pushed a commit that referenced this pull request Nov 12, 2020
Ensure BulkAll() is aborted properly if the whole bulk request keeps returning a bad statuscode and ContinueOnDroppedDocuments is true. This was introduced in #4014 when trying to address a similar issue with backOffTries being ignored.
stevejgordon pushed a commit that referenced this pull request Nov 12, 2020
Ensure BulkAll() is aborted properly if the whole bulk request keeps returning a bad statuscode and ContinueOnDroppedDocuments is true. This was introduced in #4014 when trying to address a similar issue with backOffTries being ignored.

(cherry picked from commit 9b65068)
stevejgordon added a commit that referenced this pull request Nov 12, 2020
Ensure BulkAll() is aborted properly if the whole bulk request keeps returning a bad statuscode and ContinueOnDroppedDocuments is true. This was introduced in #4014 when trying to address a similar issue with backOffTries being ignored.

Co-authored-by: R. Madison Haynie <[email protected]>
stevejgordon added a commit that referenced this pull request Nov 12, 2020
Ensure BulkAll() is aborted properly if the whole bulk request keeps returning a bad statuscode and ContinueOnDroppedDocuments is true. This was introduced in #4014 when trying to address a similar issue with backOffTries being ignored.

(cherry picked from commit 9b65068)

Co-authored-by: R. Madison Haynie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants