Describe the bug
A clear and concise description of what the bug is.
I have ca 7050 records in my test cosmosdb collection
when I execute
var cosmosQueryOptions = new CosmosQueryRequestOptions();
cosmosQueryOptions.setPartitionKey(new PartitionKey("specific pk"));
cosmosQueryOptions.setMaxDegreeOfParallelism(1);
cosmosQueryOptions.setMaxBufferedItemCount(1);
cosmosQueryOptions.setResponseContinuationTokenLimitInKb(4);
container.queryItems(query, cosmosQueryOptions, MyEntity.class).iterableByPage(token, 100).iterator().next()
my expectation is that only one query will be executed against cosmosdb
but when I check
cosmosdb metrics - these show 71 query operations
cosmos diagnostics (CDBDataPlaneRequests) - also 71 queries are displayed
what I assume means that all records are cached (71*100=7100)
in our production env
for ca 500 calls to similar function
cosmosdb metrics show over 100 000 queries
obviously this impact RU and also amount of data transferred to our pods
In our current setup when user requests next page of data we call above function
so I'd prefer to have limited bufferedItemCount
but this doesn't seem to work
Can I ask for suggestion how can I solve this?
Environment summary
SDK Version: azure-cosmos-4.62.0
Java JDK version: 17
OS Version MacOS
Describe the bug A clear and concise description of what the bug is.
I have ca 7050 records in my test cosmosdb collection when I execute
my expectation is that only one query will be executed against cosmosdb
but when I check
what I assume means that all records are cached (71*100=7100)
in our production env for ca 500 calls to similar function cosmosdb metrics show over 100 000 queries obviously this impact RU and also amount of data transferred to our pods
In our current setup when user requests next page of data we call above function so I'd prefer to have limited bufferedItemCount but this doesn't seem to work
Can I ask for suggestion how can I solve this?
Environment summary SDK Version: azure-cosmos-4.62.0 Java JDK version: 17 OS Version MacOS