Skip to content

Commit

Permalink
Fixing BulkAll indefinitely hanging when failing (#5077) (#5091)
Browse files Browse the repository at this point in the history
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 <rmadisonhaynie@yahoo.com>
  • Loading branch information
stevejgordon and rmadisonhaynie authored Nov 12, 2020
1 parent 5f937c1 commit fc84ad2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Nest/Document/Multiple/BulkAll/BulkAllObservable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ private async Task<BulkAllResponse> HandleBulkRequest(IList<T> buffer, long page

void ThrowOnExhaustedRetries()
{
if (_partitionedBulkRequest.ContinueAfterDroppedDocuments || backOffRetries < _backOffRetries) return;
if (backOffRetries < _backOffRetries) return;

throw ThrowOnBadBulk(response,
$"{nameof(BulkAll)} halted after {nameof(PipelineFailure)}.{reason} from _bulk and exhausting retries ({backOffRetries})"
Expand Down

0 comments on commit fc84ad2

Please sign in to comment.