Azure / azure-cli

Azure Command-Line Interface
MIT License
3.95k stars 2.93k forks source link

cannot redistribute partition throughput on cosmosdb with >50 partitions #29341

Open IanBrown-OAG opened 1 month ago

IanBrown-OAG commented 1 month ago

Describe the bug

using https://learn.microsoft.com/en-us/cli/azure/cosmosdb/sql/container?view=azure-cli-latest#az-cosmosdb-sql-container-redistribute-partition-throughput which admittedly is in preview, to even out the RU distribution, it fails with an error

Related command

az cosmosdb sql container redistribute-partition-throughput --resource-group $resourceGroupName --account-name $accountName --database-name $dbName --name $containerName --evenly-distribute

Errors

az : ERROR: (BadRequest) Message: {"code":"BadRequest","message":"Message: {\"Errors\":[\"Max allowed partition throughput reads per request is currently 50.\"]}\r\n

Issue script & Debug output

cosmos_error.txt too large to insert, attached

Expected behavior

I expect it to redistribute the RUs across the partitions.

Environment Summary

azure-cli 2.62.0

core 2.62.0 telemetry 1.1.0

Extensions: account 0.2.5 cosmosdb-preview 1.0.1 stream-analytics 1.0.0

Dependencies: msal 1.28.1 azure-mgmt-resource 23.1.1

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'

Python (Windows) 3.11.8 (tags/v3.11.8:db85d51, Feb 6 2024, 21:52:07) [MSC v.1937 32 bit (Intel)]

Additional context

No response

yonzhan commented 1 month ago

Thank you for opening this issue, we will look into it.