-
Notifications
You must be signed in to change notification settings - Fork 41
BulkExecutor in .net Core console application exits without error #64
Comments
To be more precise - regarding the fact that the console application just exits unexpectedly - I had put a try catch statement around the BulkUpdateAsync statment with two catch blocks, just as in the example (with a DocumentClientException and a Exception respectively),. After the BulkUpdateAsync statment a log statement follows - this is never reached however. Neither is either of the catch blocks reached. The console application just stops. I've noticed in the output window the following statements b.t.w.: Is there a minimum that you can have for a batch. I wanted to test with 100 records first, to see if everything works correctly. But that doesn't explain why the console application would just exit, without reaching one of the catch blocks. I've also tried to force a break by using the Exception Settings tab to force breaks on all Common Language Runtime Exceptions (and later on all exceptions. But nothing happens then either. |
I solved this myself - I replaced the await statement with a synchrounous call by getting the Result value from the BulkUpdateAsync statement. By doing this the console application doesn't just exit but after having performed the BulkUpdateStatement the next statement (being the logger statement) is executed. This is of course just a work around, but it seems the .net core version has an error in the asynchronous execution of the method somewhere. Which should be looked into and fixed imo. |
I've managed to solve the issue with the getting the tracing statements in the BulkExecutor b.t.w. As I've mentioned - I've used SeriLog as an extra logging framework. It also has a TraceListener - I just had to attach the Serilog Logger to the interface of the BulkExecutor and attached the logger to the seriloglistener like thus:
|
I'm using the bulk executor in a .net Core console application to perform updates and for some reason it just exits unexpectedly after the call of BulkUpdateAsync, without any error information. I've used the examples for the .net framework version, presuming that it's basically the same logically, when using .net Core.
Are there any examples out there using .net standard, or core. Including how to configure logging for the bulkexecutor class? Currently I've implemented a .net core console application, using serilog for logging.
The text was updated successfully, but these errors were encountered: