Creating an item in a Cosmos DB satellite region results in an error #2292
Labels
Cosmos
The azure_cosmos crate
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
Bug Title
No response
Crate Name
azure_data_cosmos
Crate Version
0.22.1
Description
I have a Cosmos DB account set up with 3 regions (UK South - primary, UK West and West US 2) and multi-region writes are enabled.
If
COSMOSDB_URL
is either the global URL (e.g.https://testdb.documents.azure.com:443/
) or the region-specific URL for the primary region (e.g.https://testdb-uksouth.documents.azure.com:443/
) then I can create items in the database as expected. If I use the region-specific URL for either of the satellite regions (e.g.https://testdb-ukwest.documents.azure.com:443/
orhttps://testdb-westus2.documents.azure.com:443/
) then I get the errorThe requested operation cannot be performed at this region
.If I conduct the same test with the Cosmos DB Python SDK then I can create an item in each of the regions without errors by providing the region-specific URL to
CosmosClient
. I've confirmed using the Azure Portal metrics that the requests are in fact going to the specified regions.Steps to Reproduce
Create a Cosmos DB account with 3 regions (UK South - primary, UK West and West US 2), eventual consistency and multi-region writes are enabled.
Run the following code with
COSMOSDB_URL
as the URL of the primary region. I'm using thekey_auth
feature in theazure_data_cosmos
crate for simplicity.COSMOSDB_URL
to the URL of one of the satellite regions.The requested operation cannot be performed at this region
Checklist
The text was updated successfully, but these errors were encountered: