Skip to content

Conversation

@xinlian12
Copy link
Member

@xinlian12 xinlian12 commented Sep 24, 2025

Changes included:

  • Use change feed to get partition key ranges
  • Currently the throttlingRetryPolicy is applied across all pages to get partition key ranges, changed to apply for each page

Copilot AI review requested due to automatic review settings September 24, 2025 05:16
@xinlian12 xinlian12 requested review from a team and kirankumarkolli as code owners September 24, 2025 05:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the partition key range fetching mechanism by switching from regular queries to change feed queries, improving diagnostics tracking, and modifying retry policy application.

Key changes:

  • Switch to change feed approach for fetching partition key ranges to enable incremental updates
  • Fix incorrect end time tracking in CosmosDiagnostics for PARTITION_KEY_RANGE_LOOK_UP operations
  • Apply throttling retry policy per page instead of across all pages

Reviewed Changes

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

Show a summary per file
File Description
InMemoryCollectionRoutingMap.java Added change feed continuation token support and logging
CollectionRoutingMap.java Extended interface to support change feed continuation tokens
RxPartitionKeyRangeCache.java Refactored to use change feed for partition key range fetching with proper diagnostics timing
RxDocumentClientImpl.java Modified to support change feed headers and per-request retry policy
Paginator.java Added change feed flag parameter
DocumentProducer.java Updated method call to include change feed flag
DefaultDocumentQueryExecutionContext.java Updated method call to include change feed flag
Multiple test files Updated method signatures and test data to accommodate new parameters

xinlian12 and others added 4 commits September 23, 2025 22:18
@xinlian12 xinlian12 force-pushed the useChangeFeedToGetPkRanges branch from e2eaac0 to ee9cba9 Compare September 24, 2025 06:02
@xinlian12
Copy link
Member Author

/azp run java - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@xinlian12
Copy link
Member Author

/azp run java - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@xinlian12
Copy link
Member Author

/azp run java - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@xinlian12
Copy link
Member Author

/azp run java - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@FabianMeiswinkel FabianMeiswinkel left a comment

Choose a reason for hiding this comment

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

LGTM now with the validation of incomplete routng maps - Thin Client team by the way found an instance where container returned incomplete routing map last week - so, definitely worth the effort! Have a few comments around logging and reason for blockign is that I don't understand why failure would map to 404 (vs. 503)

@xinlian12
Copy link
Member Author

/azp run java - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@xinlian12
Copy link
Member Author

/azp run java - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@FabianMeiswinkel FabianMeiswinkel left a comment

Choose a reason for hiding this comment

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

LGTM - Thanks

@xinlian12 xinlian12 merged commit 670c5fa into Azure:main Oct 28, 2025
90 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.

3 participants