OrleansContrib / Orleans.CosmosDB

Orleans providers for Azure Cosmos DB
MIT License
40 stars 30 forks source link

Support serverless (preview) #46

Closed onionhammer closed 2 years ago

onionhammer commented 4 years ago

Currently when creating resources, serverless cosmos will return a 400 error

Membership failed to start: Microsoft.Azure.Cosmos.CosmosException : Response status code does not indicate success: 400 Substatus: 0 Reason: (Microsoft.Azure.Documents.DocumentClientException: Setting offer throughput or autopilot on container is not supported for serverless accounts.ActivityId: 4360c6e4-0533-441c-936a-97591ad4ed95, Microsoft.Azure.Documents.Common/2.11.0, {"RequestStartTimeUtc":"2020-11-03T16:21:20.2286515Z","RequestEndTimeUtc":"2020-11-03T16:21:20.2731706Z","RequestLatency":"00:00:00.0445191","IsCpuOverloaded":false,"NumberRegionsAttempted":1,"ResponseStatisticsList":[],"AddressResolutionStatistics":[{"StartTime":"2020-11-03T16:21:20.2287812Z","EndTime":"2020-11-03T16:21:20.2731706Z","TargetEndpoint":"https://sharedc2c-southcentralus.documents.azure.com/dbs/orleans-local/colls"}],"SupplementalResponseStatistics":[],"FailedReplicas":[],"RegionsContacted":[],"ContactedReplicas":[]}, Windows/10.0.19042 cosmos-netstandard-sdk/3.4.2 at Microsoft.Azure.Cosmos.GatewayStoreClient.ParseResponseAsync(HttpResponseMessage responseMessage, JsonSerializerSettings serializerSettings, DocumentServiceRequest request) at Microsoft.Azure.Cosmos.GatewayStoreClient.InvokeAsync(DocumentServiceRequest request, ResourceType resourceType, Uri physicalAddress, CancellationToken cancellationToken) at Microsoft.Azure.Cosmos.GatewayStoreModel.ProcessMessageAsync(DocumentServiceRequest request, CancellationToken cancellationToken) at Microsoft.Azure.Cosmos.Handlers.TransportHandler.SendAsync(RequestMessage request,

mumby0168 commented 2 years ago

I can take a look at solving this issue, we had a similar PR merged into our comsos DB repository pattern:

https://github.com/IEvangelist/azure-cosmos-dotnet-repository/pull/190