I am also getting same issue on bulk upsert of the cosmosdb
Let me know @Oury Ba-MSFT if you have solution
cosmos db DataIntegrityViolationException BulkWriteError{index=0, code=2, message='Error=2, Details='Response status code does not indicate success: BadRequest (400);
We are getting this error intermittently while doing bulk upsert in Cosmos db though we have created compound index on collection fields which we are using in criteria to insert records. Below is the error details -
2021-06-11 16:31:38,213 org.springframework.dao.DataIntegrityViolationException: Bulk write operation error on server <mongodb>:10255. Write errors: [BulkWriteError{index=0, code=2, message='Error=2, Details='Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: 88b8b7e2-4046-4ed2-8782-cf30fcc8810b; Reason: (Failed to parse the value 'dbs/osim/colls/collectionname' as ResourceId.
As per doumentation it is due to indexes on sort query but in our case we are not using sort query -
https://learn.microsoft.com/en-us/azure/cosmos-db/mongodb-troubleshoot
1 answer
Sort by: Most helpful
-
Narayangaonkar, Prashant 1 Reputation point
2021-09-06T08:12:05.94+00:00