Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement: Better handling of cosmos database creation throughput issues #4599

Open
old-guy-coder opened this issue Feb 26, 2025 · 1 comment
Labels
cx-request Requests from customers received through non-GitHub channels

Comments

@old-guy-coder
Copy link

old-guy-coder commented Feb 26, 2025

Describe the current behavior

Creating a SqlDatabase for Cosmos with manual or auto throughput when the SqlDatabase already exists with no dedicated throughput causes an error and prevents ASO from updating the database with error Updating offer to autoscale throughput is not allowed. Please invoke migration API to migrate this offer..

This can occur if the database is created/exists with Manual Throughput and ASO is then adopting that resource with configuration to use Auto throughput

Describe the improvement

Get ASO to trigger the migration API from the Azure REST API

  • migrateToAutoscale - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToAutoscale, and;
  • migrateToManualThroughput - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/migrateToManualThroughput if the ASO configuration is transitioning between Manual and Autoscale or visa-versa.

Additional context

None

@theunrepentantgeek
Copy link
Member

I believe this could be achieved by implementing the PreReconciliationChecker interface. This extension point receives the current status of the resource, allowing the check to be performed - a migration could be triggered, and Block returned from the extension point.

@theunrepentantgeek theunrepentantgeek added cx-request Requests from customers received through non-GitHub channels and removed needs-triage 🔍 labels Mar 3, 2025
@theunrepentantgeek theunrepentantgeek moved this from Backlog to Up Next in Azure Service Operator Roadmap Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cx-request Requests from customers received through non-GitHub channels
Projects
Development

No branches or pull requests

2 participants