question

RaviTejaManchikanti-5724 avatar image
0 Votes"
RaviTejaManchikanti-5724 asked RaviTejaManchikanti-5724 commented

Unable to peroform Patch operation on DB Account

Hello ,

Im trying to update Virtual network on Cosmos DB Account, though I dont see any activity on that particular Account I see below error while using Patch Rest API


There is already an operation in progress which requires exlusive lock on this service mangoservicenowdbaccount. Please retry the operation after sometime.
ActivityId: 7272845f-0f15-4c21-b5b8-4bdacf546329, Microsoft.Azure.Documents.Common/2.11.0

azure-cosmos-db
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@ravitejamanchikanti-5724 Hope the below information helped you. Please get back to us if you need any further help.

0 Votes 0 ·

Not much. If Possible can we connect over a call to discuss the challenges i'm facing ?

0 Votes 0 ·
MarkBrownMSFT avatar image
0 Votes"
MarkBrownMSFT answered RaviTejaManchikanti-5724 edited

The Cosmos DB resource provider does not support PATCH operations. You must do a GET on the resource and then a PUT on the entire resource with your changed property value.

Thanks.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Mark, Thanks For the response. But I could see the Patch DB Account Document. is that incorrect ?
https://docs.microsoft.com/en-us/rest/api/cosmos-db-resource-provider/databaseaccounts/update

0 Votes 0 ·
MarkBrownMSFT avatar image
0 Votes"
MarkBrownMSFT answered

Yes sorry, I should clarify. The databaseAccount resource supports patch but none of the child resources do. You can use patch to modify the vnet settings.

Regarding your error I don't have any deeper insights other than there was something else modifying the databaseAccount resource when you issued this command. If it persists you need to contact support to investigate.

Thanks.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.