-
Notifications
You must be signed in to change notification settings - Fork 523
Open
Labels
Description
Problem occurs in v3.43.0
Describe the bug
FeedIterator<>.ReadNextAsync() blocks indefinitely when existing in a .NET 4.8 web forms app (presumably running in AspNetSynchronizationContext). This issue does not occur when running in a console app.
To Reproduce
- Configure a CosmosDB with a container.
- Execute the following with updated end point details etc.
var endpointUri = "*****";
var primaryKey = "*****";
var databaseId = "*****";
var containerId = "*****";
var cosmosClient = new CosmosClient(endpointUri, primaryKey);
var container = cosmosClient.GetContainer(databaseId, containerId);
var sqlQueryText = "SELECT * FROM c";
var queryDefinition = new QueryDefinition(sqlQueryText);
var queryResultSetIterator = container.GetItemQueryIterator<dynamic>(queryDefinition);
while (queryResultSetIterator.HasMoreResults)
{
foreach (var item in await queryResultSetIterator.ReadNextAsync().ConfigureAwait(false)) // <- blocks here
{
Console.WriteLine(item);
}
}
Expected behavior
Call to queryResultSetIterator.ReadNextAsync does not block indefinitely and returns the data in the container.
Actual behavior
Call to queryResultSetIterator.ReadNextAsync blocks indefinitely.
Environment summary
SDK Version: Framework 4.8.1
OS Version: Windows 11
Additional context
Seems like this issue was introduced in v3.38.0. v3.37.1 does not block. So I'm using that version for the moment.
Copilot
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
In Progress