-
Notifications
You must be signed in to change notification settings - Fork 524
Description
We are continuously addressing and improving the SDK, if possible, make sure the problem persist in the latest SDK version.
Describe the bug
System.ArgumentException: An item with the same key has already been added. Key: ApplicationId
at Microsoft.Azure.Cosmos.CrossRegionHedgingAvailabilityStrategy.RequestSenderAndResultCheckAsync(Func3 sender, RequestMessage request, String hedgedRegion, CancellationToken cancellationToken, CancellationTokenSource cancellationTokenSource, ITrace trace) at Microsoft.Azure.Cosmos.CrossRegionHedgingAvailabilityStrategy.CloneAndSendAsync(Func3 sender, RequestMessage request, CloneableStream clonedBody, IReadOnlyCollection1 hedgeRegions, Int32 requestNumber, ITrace trace, CancellationToken cancellationToken, CancellationTokenSource cancellationTokenSource) at Microsoft.Azure.Cosmos.CrossRegionHedgingAvailabilityStrategy.ExecuteAvailabilityStrategyAsync(Func3 sender, CosmosClient client, RequestMessage request, CancellationToken cancellationToken)
at Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler.SendAsync(RequestMessage request, CancellationToken cancellationToken)
at Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler.SendAsync(String resourceUriString, ResourceType resourceType, OperationType operationType, RequestOptions requestOptions, ContainerInternal cosmosContainerCore, FeedRange feedRange, Stream streamPayload, Action1 requestEnricher, ITrace trace, CancellationToken cancellationToken) at Microsoft.Azure.Cosmos.CosmosQueryClientCore.ExecuteItemQueryAsync(String resourceUri, ResourceType resourceType, OperationType operationType, FeedRange feedRange, QueryRequestOptions requestOptions, AdditionalRequestHeaders additionalRequestHeaders, SqlQuerySpec sqlQuerySpec, String continuationToken, Int32 pageSize, ITrace trace, CancellationToken cancellationToken) at Microsoft.Azure.Cosmos.Pagination.PartitionRangePageAsyncEnumerator2.MoveNextAsync(ITrace trace, CancellationToken cancellationToken)
at Microsoft.Azure.Cosmos.Pagination.BufferedPartitionRangePageAsyncEnumerator2.PrefetchAsync(ITrace trace, CancellationToken cancellationToken) at Microsoft.Azure.Cosmos.Pagination.BufferedPartitionRangePageAsyncEnumerator2.GetNextPageAsync(ITrace trace, CancellationToken cancellationToken)
at Microsoft.Azure.Cosmos.Pagination.PartitionRangePageAsyncEnumerator2.MoveNextAsync(ITrace trace, CancellationToken cancellationToken) at Microsoft.Azure.Cosmos.Pagination.CrossPartitionRangePageAsyncEnumerator2.MoveNextAsync(ITrace trace, CancellationToken cancellationToken)
at Microsoft.Azure.Cosmos.Query.Core.Pipeline.CrossPartition.Parallel.ParallelCrossPartitionQueryPipelineStage.MoveNextAsync(ITrace trace, CancellationToken cancellationToken)
at Microsoft.Azure.Cosmos.Query.Core.Pipeline.LazyQueryPipelineStage.MoveNextAsync(ITrace trace, CancellationToken cancellationToken)
at Microsoft.Azure.Cosmos.Query.Core.Pipeline.NameCacheStaleRetryQueryPipelineStage.MoveNextAsync(ITrace trace, CancellationToken cancellationToken)
at Microsoft.Azure.Cosmos.Query.Core.Pipeline.CatchAllQueryPipelineStage.MoveNextAsync(ITrace trace, CancellationToken cancellationToken)
at Microsoft.Azure.Cosmos.Query.QueryIterator.ReadNextAsync(ITrace trace, CancellationToken cancellationToken)
at Microsoft.Azure.Cosmos.FeedIteratorCore1.ReadNextAsync(ITrace trace, CancellationToken cancellationToken) at Microsoft.Azure.Cosmos.ClientContextCore.RunWithDiagnosticsHelperAsync[TResult](String containerName, String databaseName, OperationType operationType, ITrace trace, Func2 task, Nullable1 openTelemetry, RequestOptions requestOptions, Nullable1 resourceType)
at Microsoft.Azure.Cosmos.ClientContextCore.OperationHelperWithRootTraceAsync[TResult](String operationName, String containerName, String databaseName, OperationType operationType, RequestOptions requestOptions, Func2 task, Nullable1 openTelemetry, TraceComponent traceComponent, TraceLevel traceLevel, Nullable1 resourceType) at Microsoft.Azure.PowerApps.Data.DataProviders.Cosmos.Base.PowerPlatformMetadataStoreCosmosSdkDataProvider.ExecuteWithLogging[TValue,TOperationResponse,TOperationResponseType,TRootValueType](Func1 operation, String operationName, Boolean handleNotFound, Func`2 responseAction, Boolean isHealthCheck) in C:__w\1\s\src\powerapps\Roles\PowerApps.Data
Expected behavior
Is able to make find call with cosmos db successfully
Actual behavior
Fails to make a find call with cosmos db sdk
Environment summary
SDK Version:
OS Version Windows
Additional context
Add any other context about the problem here (for example, complete stack traces or logs).