You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MaxBufferedItemCount is not being honored. If you set the MaxBufferedItemCount to 0 if you look at fiddler the SDK will still drain the entire query in the background. The problem with this is anyone doing the paging model will be paying to drain the entire query even though it is only using the first page.
Here is an example that reproduces the issue.
using DocumentClient client = new DocumentClient(
new Uri(https://cosmosdbdotnetperf.documents.azure.com:443/),
"",
new ConnectionPolicy(){
ConnectionMode = ConnectionMode.Gateway,
ConnectionProtocol = Protocol.Https,
},
ConsistencyLevel.Eventual);
string dbName = "testdb";
string containerName = "tempdb";
Uri collectionLink = UriFactory.CreateDocumentCollectionUri(dbName, containerName);
for(int i = 0; i < 20; i++)
{
await client.CreateDocumentAsync(collectionLink, new { id = Guid.NewGuid().ToString(), pk = "Test" + Guid.NewGuid().ToString(), random = "Test" });
}
var query = client.CreateDocumentQuery(collectionLink,
"select * from T where T.random = 'Test'",
new FeedOptions()
{
MaxItemCount = 5,
MaxDegreeOfParallelism = 1,
MaxBufferedItemCount = 0,
EnableCrossPartitionQuery = true,
}).AsDocumentQuery();
while (query.HasMoreResults)
{
var result = await query.ExecuteNextAsync();
string s = result.SessionToken;
Console.WriteLine(s);
}
The text was updated successfully, but these errors were encountered:
MaxBufferedItemCount gets honoured only when we have cross partition query (or parallel execution) So basically it is applicable for below query contexts:
CrossPartitionQueryExecutionContext (line number 178)
The MaxBufferedItemCount is not being honored. If you set the MaxBufferedItemCount to 0 if you look at fiddler the SDK will still drain the entire query in the background. The problem with this is anyone doing the paging model will be paying to drain the entire query even though it is only using the first page.
Here is an example that reproduces the issue.
The text was updated successfully, but these errors were encountered: