question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CosmosQueryRequestOptions excludes old FeedOptions

See original GitHub issue

Is your feature request related to a problem? Please describe. Not sure if this is a regression bug or feature request but the PopulateQueryMetrics feed option is not exposed as a member of the CosmosQueryRequestOptions class.

In fact there are a number of feed options which have been left out between the current client and this one. Have these options been left off for a reason or are they configurable else where?

Comparison between FeedOptions & CosmosQueryRequestOptions

Property Status
ConsistencyLevel Supported
EnableCrossPartitionQuery Internally Set (no public access)
EnableLowPrecisionOrderBy Supported
EnableScanInQuery Supported
JsonSerializerSettings Not Supported
MaxBufferedItemCount Supported
MaxDegreeOfParallelism Supported (called MaxConcurrency and no longer request option)
MaxItemCount Supported (no longer request option)
PartitionKey Supported
PartitionKeyRangeId Not Supported
PopulateQueryMetrics Not Supported
RequestContinuation Not Supported
ResponseContinuationTokenLimitInKb Supported
SessionToken Supported

Describe the solution you’d like Are there any objections to adding PopulateQueryMetrics as an option to CosmosQueryRequestOptions? I’ve tested and confirmed that CosmosQueryResponse<T> includes the metrics if set. This setting is really useful for performance tuning etc.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
j82wcommented, Aug 28, 2019

@nh43de EnableCrossPartitionQuery is enabled by default in v3.

2reactions
j82wcommented, Aug 27, 2019

@RobertDougan the PR is out to add QueryMetrics support. Hopefully we will have a release in next 2 to 3 weeks.

@nh43de the only option that I’m aware of is the PartitionKeyRangeId and the query metrics. Query Metrics will be fixed in this PR. The reason PartitionKeyRangeId was removed is it’s more of an internal implementation detail. It allows a small performance gain, but it’s rather complex with lots of corner cases that don’t show up until it’s in production. It was decided it was better to remove the property since it caused so many issues with so little gain. Is there a specific property you need that isn’t supported?

Read more comments on GitHub >

github_iconTop Results From Across the Web

CosmosQueryRequestOptions Class
Specifies the options associated with query methods (enumeration operations) in the Azure Cosmos DB database service.
Read more >
What is the difference in using maxDegreeOfParallelism in ...
What is the difference in using maxDegreeOfParallelism in CosmosQueryRequestOptions and FeedOptions in Cosmos JAVA SDK?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found