问题
I'm a little new to Azure Cosmos DB.
I wanted to know if it has an option to make a number of operations on multiple containers as one atomic operation. E.g., all succeed or or fail from a .NET backend.
回答1:
Operations are atomic to a single operation in a single container. If you use a Stored Procedure, you may perform an atomic set of multiple operations within a single partition within a single container.
You cannot perform any atomic operations across multiple containers, or across multiple partitions of a single container. This has nothing to do with which language environment (e.g. .NET as you mentioned) you're using. This is just how the Cosmos DB service works.
来源:https://stackoverflow.com/questions/60197475/inserting-to-a-number-of-containers-in-azure-cosmos-db-as-one-atomic-operation