作为一项原子操作,将其插入到天蓝色cosmos db中的多个容器中 [英] Inserting to a number of containers in azure cosmos db as one atomic operation

查看:55
本文介绍了作为一项原子操作,将其插入到天蓝色cosmos db中的多个容器中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Azure Cosmos DB的新手.

I'm a little new to Azure Cosmos DB.

我想知道它是否可以选择将多个容器上的多个操作作为一个原子操作进行.例如,所有操作都是从.NET后端成功或失败.

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.

推荐答案

对于单个容器中的单个操作而言,操作是原子的.如果您使用存储过程,则可以在单个容器内的单个分区内执行一系列原子操作.

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.

您不能跨多个容器或单个容器的多个分区执行任何原子操作.这与您使用的语言环境(例如您提到的.NET)无关.这就是Cosmos DB服务的工作方式.

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.

这篇关于作为一项原子操作,将其插入到天蓝色cosmos db中的多个容器中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆