Skip to content

Commit 1d98e5d

Browse files
committed
Adding note for retry configuration
1 parent 97cf745 commit 1d98e5d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

articles/cosmos-db/how-to-migrate-from-bulk-executor-library.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,15 @@ The `BulkOperationResponse` contains:
6969
1. The total of request units consumed.
7070
1. If there are failures, it displays a list of tuples that contain the exception and the associated item for logging and identification purpose.
7171

72+
## Retry configuration
73+
74+
Bulk executor library had [guidance](bulk-executor-dot-net.md#bulk-import-data-to-an-azure-cosmos-account) that mentioned to set the `MaxRetryWaitTimeInSeconds` and `MaxRetryAttemptsOnThrottledRequests` of [RetryOptions](https://docs.microsoft.com/dotnet/api/microsoft.azure.documents.client.connectionpolicy.retryoptions) to `0` to delegate control to the library.
75+
76+
For bulk support in the .NET SDK, there is no hidden behavior. You can configure the retry options directly through the [CosmosClientOptions.MaxRetryAttemptsOnRateLimitedRequests](https://docs.microsoft.com/dotnet/api/microsoft.azure.cosmos.cosmosclientoptions.maxretryattemptsonratelimitedrequests) and [CosmosClientOptions.MaxRetryWaitTimeOnRateLimitedRequests](https://docs.microsoft.com/dotnet/api/microsoft.azure.cosmos.cosmosclientoptions.maxretrywaittimeonratelimitedrequests).
77+
78+
> [!NOTE]
79+
> In cases where the provisioned request units is much lower than the expected based on the amount of data, you might want to consider setting these to high values. The bulk operation will take longer but it has a higher chance of completely succeeding due to the higher retries.
80+
7281
## Performance improvements
7382

7483
As with other operations with the .NET SDK, using the stream APIs results in better performance and avoids any unnecessary serialization.

0 commit comments

Comments
 (0)