Skip to content

azcosmos: include partition key in read many telemetry - #27491

Merged
Tomas Varon (tvaron3) merged 5 commits into
Azure:mainfrom
tvaron3:tvaron3-address-issue-27476
Aug 31, 2026
Merged

azcosmos: include partition key in read many telemetry#27491
Tomas Varon (tvaron3) merged 5 commits into
Azure:mainfrom
tvaron3:tvaron3-address-issue-27476

Conversation

@tvaron3

@tvaron3 Tomas Varon (tvaron3) commented Aug 31, 2026

Copy link
Copy Markdown
Member

Fixes #27476.

Summary

  • include the logical partition key header for ReadManyItems requests when all items share the same partition key
  • preserve cross-partition behavior for mixed logical keys
  • reuse canonical partition-key comparison for query shaping and header selection
  • add coverage for scalar, hierarchical, mixed, and signed-zero partition keys

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6e711ffc-e2b2-4eeb-aba7-cd96e0c720d3
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6e711ffc-e2b2-4eeb-aba7-cd96e0c720d3
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
5 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6e711ffc-e2b2-4eeb-aba7-cd96e0c720d3
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6e711ffc-e2b2-4eeb-aba7-cd96e0c720d3
@tvaron3
Tomas Varon (tvaron3) marked this pull request as ready for review August 31, 2026 19:15
Copilot AI balanced review requested due to automatic review settings August 31, 2026 19:15
@tvaron3
Tomas Varon (tvaron3) requested a review from a team as a code owner August 31, 2026 19:15
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
5 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds logical partition-key telemetry to ReadManyItems while preserving cross-partition behavior.

Changes:

  • Reuses canonical partition-key comparison.
  • Sets headers only for complete, shared partition keys.
  • Adds scalar, hierarchical, mixed-key, and signed-zero tests.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
cosmos_query_builder.go Reuses shared partition-key detection.
cosmos_container_read_many.go Adds shared-key header selection.
cosmos_container_read_many_test.go Tests partition-key header behavior.
CHANGELOG.md Documents the telemetry fix.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread sdk/data/azcosmos/cosmos_query_builder.go Outdated
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6e711ffc-e2b2-4eeb-aba7-cd96e0c720d3
Copilot AI review requested due to automatic review settings August 31, 2026 20:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@github-project-automation github-project-automation Bot moved this from Triage to Ready To Merge in CosmosDB GO V2 SDK Aug 31, 2026
@tvaron3
Tomas Varon (tvaron3) merged commit 81131dd into Azure:main Aug 31, 2026
21 checks passed
@github-project-automation github-project-automation Bot moved this from Ready To Merge to Done in CosmosDB GO V2 SDK Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

CDBPartitionKeyRUConsumption table contains an empty PartitionKey for ReadManyItems queries with a logical partition key

3 participants