You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cieciurm
changed the title
Handling unsuccessful documents upsert via Bulk API
Handling unsuccessful documents upsert / delete via Bulk API
Oct 4, 2024
Hi,
I've migrated my application using
Azure CosmosDB SDK
to v3 and I'm using the bulk functionality to upsert somewhere between 200 and 1000 items.Using the
BulkExecutor
and its configuration I was getting 100% success rate when upserting - all documents were saved.In V3 I'm getting 429 response, and only some documents are saved. I'm not sure how I should handle those that were not saved.
ClientOptions
setup:I'm using the
BulkOperations<T>
wrapper as described in the docs.My main method for bulk upserting looks like this:
After inspecting the
BulkOperationResponse<T>
I often see that only a chunk of documents, were saved.I have the same issue when trying to bulk delete documents via a method:
I'm using a shared throughput for 4 containers - 400 RU/s.
What's the recommended approach to retry upserting of the failed documents?
Should it be handled by the SDK or should I retry in my code?
Thanks in advance for any guidance :)
Environment summary
SDK Version: 3.43.1
The text was updated successfully, but these errors were encountered: