Skip to content

Commit

Permalink
Fixing BulkAll indefinitely hanging when failing
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 elastic#4014 when trying to address a similar issue with backOffTries being ignored.
  • Loading branch information
rmadisonhaynie authored Nov 6, 2020
1 parent 974dd79 commit 5c1199c
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 @@ -204,7 +204,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 5c1199c

Please sign in to comment.