3C's
Concern: Error for Send Bulk API
Cause: Send Bulk API uses parallel loop to generate token for each template. The context that is needed for common routines was not getting initialized for every thread which resulted in this issue. Common routine object was recently removed in caching changes.
Actual error log: System.AggregateException: One or more errors occurred. (A second operation started on this context before a previous operation completed. This is usually caused by different threads using the same instance of DbContext, however instance members are not guaranteed to be thread safe. This could also be caused by a nested query being evaluated on the client, if this is the case rewrite the query avoiding nested invocations.) ---> System.InvalidOperationException: A second operation started on this context before a previous operation completed. This is usually caused by different threads using the same instance of DbContext, however instance members are not guaranteed to be thread safe. This could also be caused by a nested query being evaluated on the client, if this is the case rewrite the query avoiding nested invocations.
Correction: We have created a commonroutine object in parallel loop for that different threads use different objects.
CC:Rohan J Khandave
3C's
Concern: Error for Send Bulk API
Cause: Send Bulk API uses parallel loop to generate token for each template. The context that is needed for common routines was not getting initialized for every thread which resulted in this issue. Common routine object was recently removed in caching changes.
Actual error log: System.AggregateException: One or more errors occurred. (A second operation started on this context before a previous operation completed. This is usually caused by different threads using the same instance of DbContext, however instance members are not guaranteed to be thread safe. This could also be caused by a nested query being evaluated on the client, if this is the case rewrite the query avoiding nested invocations.) ---> System.InvalidOperationException: A second operation started on this context before a previous operation completed. This is usually caused by different threads using the same instance of DbContext, however instance members are not guaranteed to be thread safe. This could also be caused by a nested query being evaluated on the client, if this is the case rewrite the query avoiding nested invocations.
Correction: We have created a commonroutine object in parallel loop for that different threads use different objects.
CC:Rohan J Khandave