-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Cosmos DB: is CosmosExecutionStrategy applied for queries? #24343
Comments
There haven't been any specific changes for this since EF 5.0.0-preview.3, but note that the strategy will only retry 6 times by default and then fail. Enable logging to see whether this was the case. |
Logging is enabled. Default CosmosExecutionStrategy works well for SaveChangesAsync but not for DbSet.FindAsync and not for IQueryable.ToArrayAsync. I see Enumerator implementations in EFCore.Relational\Query\Internal respect Execution Strategy but I see nothing in EFCore.Cosmos\Query\Internal that would use Execution Strategy. For me it looks like a bug. |
@alexeymarkov You are right, |
So do you suggest disabling CosmosExecutingStrategy for SaveChangesAsync as it does not really make sense as there is a built-in retry in CosmosClient? |
There could be a case for that, however the built-in policy doesn't always retry write operations https://github.com/Azure/azure-cosmos-dotnet-v3/blob/master/Microsoft.Azure.Cosmos/src/ClientRetryPolicy.cs#L313 |
OK, thanks. |
Hello,
currently I have to use EF 5.0.0-preview.3.20181.2 because EF Core 5 release is not working in Azure Functions.
And it seems CosmosExecutionStrategy is not applied when doing queries.
It is correct?
If yes, is it fixed in EF Core 5 release?
Regards,
Alexey Markov
The text was updated successfully, but these errors were encountered: