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

Bugfix/enable index metrics #26626

Merged
merged 8 commits into from
Sep 7, 2023

Conversation

topshot99
Copy link
Member

Packages impacted by this PR

@azure/cosmos

Issues associated with this PR

This PR tends to enable index metrics for aggregate queries in node/JS sdk

Describe the problem that is addressed by this PR

What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?

Are there test cases added in this PR? (If not, why?)

Yes

Provide a list of related PRs (if any)

Command used to generate this PR:**(Applicable only to SDK release request PRs)

Checklists

  • Added impacted package name to the issue description
  • Does this PR needs any fixes in the SDK Generator?** (If so, create an Issue in the Autorest/typescript repository and link it here)
  • Added a changelog (if necessary)

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

if (results === undefined) {
break;
}
assert.notEqual(indexMetrics, undefined);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add checks on structure of indexMetrics. i.e. properties we expect to see in the object.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than this. LGTM.

Copy link
Member Author

@topshot99 topshot99 Sep 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@v1k1, this has been already verified in the older PR: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/cosmosdb/cosmos/test/public/indexMetrics.spec.ts .
This PR is for supporting index metrics feature for non-streameable/aggregate queries(we were not supporting index metric header for aggregate queries, this PR fixes it).

@sajeetharan sajeetharan merged commit 8c4eff9 into Azure:main Sep 7, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants