BulkAll vs. Exceptions
See original GitHub issueUsing NEST 5.2 with this index code;
var waitHandle2 = new CountdownEvent(1);
var bulkAll = elasticClient.BulkAll(docs, b => b
.MaxDegreeOfParallelism(8)
.BackOffTime(TimeSpan.FromSeconds(10))
.BackOffRetries(2)
.Size(1000)
.RefreshOnCompleted()
.Index(indexName)
);
bulkAll.Subscribe(new BulkAllObserver(
onNext: (b) => { Console.Write("."); },
onError: (e) => { throw e; },
onCompleted: () => waitHandle2.Signal()
));
waitHandle2.Wait();
return;
If an exception is thrown the onError
is hit, but the code never reaches the return
statement
Please advise
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:5 (5 by maintainers)
Top Results From Across the Web
ElasticSearch Nest BulkAll halted after receiving failures ...
This means that the BulkAll observable is unable to index one or more documents that have failed for a reason that cannot be...
Read more >Error: 'BulkAll halted after receiving failures that can not be ...
I am currently using a foreach to index through a pipeline using the nest client. This is slow and highly inefficient. But works....
Read more >Indexing documents | Elasticsearch .NET Clients [7.16]
An observer such as BulkAllObserver should not throw exceptions from its interface implementations, such as OnNext and OnError . Any exceptions thrown should...
Read more >More advanced features of the high-level .NET client
The BulkAll helper frees you from handling retry, chunking or back off request functionality. It automatically retries if the request fails, backs off...
Read more >Invalid NEST response built from a successful (200) low ...
I saw the following error message in the logs: BulkAll halted after receiving failures that can not be retried from _bulk at Nest....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Instead of calling
.Subscribe()
you can now also call.Wait(TimeSpan, Action onNext)
which will block and throw exceptions more naturally if blocking is the desired behavior.Thanks mate - and keep up the good work!