Forum Discussion
Replace Operation Cosmos Db
mannu2050 Thank you!
Thanks Manish and Jill.
We did notice we had response code 449 on certain replaceitem requests but on upsertItem we had 200 response for the same loadtest. Any specific reason why replace operation can encounter 449's with the same load while upsertitem won't and what does that imply?
With Regards,
Nitin Rahim
- mannu2050Jan 04, 2024
Microsoft
449 error generated when you do multiple operations on the same document at the same second. This happens during load test when there is a skewness of sample values and you end up concentrating all of load to specific values. It can come up with any of the methods you have mentioned.
- nitinrahimJan 04, 2024Brass Contributor
Thanks Manish.
We are loading sequentially only (1 record create, then read the same document then replace/upsert as mentioned above all immediately though) and then second document for testing purpose. We noted that consistently throughout this test that 449 happens's only on 'replace' operations. Upsert positively gives a '200' OK response. And we ran the same test after deleting data many times and we see this behavior. So was checking regarding any atomicity or database specific (with respect to consistency etc) property differences with respect to replace and upsert operations? And if we receive 449s do we need to manually retry ( or a specific retry logic) those 449 response codes so the SDK will retry or had retried already? We did see 449's on Create operations before but thats not related this this discussion scope.
With Regards,
Nitin Rahim
- mannu2050Jan 04, 2024
Microsoft
Thanks Nitin for your response! Can you raise a support ticket? I will get this investigated.