I have an Azure Cosmos DB with a UserData collection which contains multiple documents of users.
The documents are edited via an azure function which grabs the document, parses the json to a class, edits the class as needed, and sets it back as the user document.
So what if while it's doing that another azure function is called grabbing the document from Azure Cosmos DB and doing other changes before the first function is done? Even if it's changing completely separate fields in the document the other fields remain the same and Azure has no obvious way of knowing what fields to overwrite and which to keep.
The only way this could behandled is if the request for the document waits until whatever function which requested it first has finished requesting it but again I don't know how Azure can figure that out.