Skip to content
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

Sample Code Incorrect For BufferedItemCount In Parallel Query #70

Open
ssharma100 opened this issue Aug 6, 2024 · 0 comments
Open

Sample Code Incorrect For BufferedItemCount In Parallel Query #70

ssharma100 opened this issue Aug 6, 2024 · 0 comments

Comments

@ssharma100
Copy link

private void queryWithPagingAndContinuationTokenAndPrintQueryCharge(CosmosQueryRequestOptions options) throws Exception {

In the sample code Line: 263: parallelQueryWithPagingAndContinuationTokenAndPrintQueryCharge()

The example method attempts to re-use the existing method:

    options.setMaxDegreeOfParallelism(0);
    options.setMaxBufferedItemCount(100);
    queryWithPagingAndContinuationTokenAndPrintQueryCharge(options);

Here, the expectation is that the "options" that have the parallel query specific options/settings will be passed to:
parallelQueryWithPagingAndContinuationTokenAndPrintQueryCharge - in the method that is called the options parameter passed in the method is never used.

The parallelQueryWithPagingAndContinuationTokenAndPrintQueryCharge() method is written to set its own "default" CosmosQueryRequestOptions and never honor or checks for the parameter.

Likewise the main execution of the queriesDemo() Line 102 calls the method with a new constructor to satisfy the parameter signature, but it too is not used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant