This repository is for active development of the Azure SDK for Java. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/java/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-java.
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?
Setup (please complete the following information):
OS: MacOs
IDE: IntelliJ
Library/Libraries: azure-cosmos-4.62.0
Java version: 17
Frameworks: Spring Boot 3.0.5
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
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?
Setup (please complete the following information):
Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report