Skip to content

Sample Code Incorrect For BufferedItemCount In Parallel Query #70

@ssharma100

Description

@ssharma100

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions