简体   繁体   English

即使有数千个分区,Azure Cosmos Lease Container 也只会为整个容器创建一个租约

[英]Azure Cosmos Lease Container only creates one lease for whole container even though there are thousands of partitions

I have created an azure function that uses CosmosDBTrigger to monitor changes.我创建了一个 azure 函数,它使用 CosmosDBTrigger 来监视更改。 Azure 函数设置

I added 120,000 items to the container very quickly and watched my azure function scale to 20 servers but there CPU was barely being utilized (except for one)我非常快速地向容器添加了 120,000 个项目,并看着我的 azure 函数扩展到 20 个服务器,但 CPU 几乎没有被使用(除了一个) 20台服务器,CPU不够用

I checked my lease container and there was only two items, one being the lease and one being the .info我检查了我的租赁容器,只有两个项目,一个是租约,一个是 .info 在此处输入图片说明

Here is the settings for the lease container这是租赁容器的设置在此处输入图片说明

My partition in my container I am listening to is "ClientOrderId" so every order is in its own partition (write heavy).我正在侦听的容器中的分区是“ClientOrderId”,因此每个订单都在其自己的分区中(写入繁重)。 Why isn't my lease container distributing the leases so my azure functions can run in parallel?为什么我的租用容器不分配租用以便我的 azure 函数可以并行运行?

Thanks in advance.提前致谢。

The number of leases is for the Physical Partitions, not Logical Partitions.租用数用于物理分区,而不是逻辑分区。

See: https://docs.microsoft.com/azure/cosmos-db/partition-data请参阅: https : //docs.microsoft.com/azure/cosmos-db/partition-data

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 BlobLeaseClient 租用 Azure 存储容器中的单个 Blob? - How do I lease an individual blob in an Azure storage container using BlobLeaseClient? Azure Blob租赁和发布 - Azure Blob Lease and release 同时在同一天蓝色斑点上获取租约 - Acquire lease on the same azure blob at the same time Azure storage 'Lease' - 正确的异常方法 - Azure storage 'Lease' - correct exception approach Azure函数中实例id获取主机锁租约的原因是什么? - What is the reason for host lock lease acquired by instance id in Azure function? 使用 Azure DevOps C# 为构建设置租约 API - Set lease for build with Azure DevOps API in C# 注销租约会引发InvalidOperationException - Unregister Lease throws InvalidOperationException 如何使用 Azure 客户端库 v12 将整个容器从一个 Azure Blob 服务复制到另一个 - How to copy whole Container from one Azure Blob Service to another with Azure Client Library v12 (412) 指定了租约 ID,但 blob 的租约已过期 - (412) A lease ID was specified, but the lease for the blob has expired Azure Cosmos DB - 如何在不同的控制器中使用不同的容器 Id 实例化 Cosmos Db - Azure Cosmos DB - How to instantiate Cosmos Db with a different container Id in different controllers
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM