Add throughput bucket support for Change Feed Processor feed polling#49583
Open
arnabnandy7 wants to merge 1 commit into
Open
Add throughput bucket support for Change Feed Processor feed polling#49583arnabnandy7 wants to merge 1 commit into
arnabnandy7 wants to merge 1 commit into
Conversation
Contributor
|
Thank you for your contribution @arnabnandy7! We will review the pull request and get back to you soon. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Change Feed Processor (CFP) support for throughput buckets by enabling server-side throughput control groups when ThroughputControlGroupConfig.throughputBucket is configured, covering both PK-range and EPK-range CFP implementations.
Changes:
- Enable
enableServerThroughputControlGroup(...)for CFP feed polling whenthroughputBucketis set (PK-range + EPK-range paths). - Add unit tests validating server throughput control group enablement for both CFP paths when
throughputBucketis configured. - Document the feature addition in the Cosmos SDK changelog.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/changefeed/pkversion/FeedRangeThroughputControlConfigManager.java | Switches CFP PK-range path to enable server throughput control when throughputBucket is present. |
| sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/changefeed/epkversion/FeedRangeThroughputControlConfigManager.java | Adds one-time enablement of server throughput control for throughput-bucket configs in CFP EPK-range path. |
| sdk/cosmos/azure-cosmos/CHANGELOG.md | Notes the new CFP throughput bucket support. |
| sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/changefeed/pkversion/FeedRangeThroughputControlConfigManagerTests.java | Adds unit coverage for throughput-bucket behavior (PK-range path). |
| sdk/cosmos/azure-cosmos-tests/src/test/java/com/azure/cosmos/implementation/changefeed/epkversion/FeedRangeThroughputControlConfigManagerTests.java | Adds unit coverage for throughput-bucket behavior (EPK-range path). |
Comment on lines
39
to
43
| // throughput control internally will divide the target RU across all pk ranges | ||
| // so all pk ranges can use the same local throughput control group | ||
| // Note: if global throughput control be added in future, then we will need to create one group per pkRange | ||
|
|
||
| if (this.throughputControlGroupEnabled.compareAndSet(false, true)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds throughput bucket support for Change Feed Processor feed polling throughput control in Azure Cosmos DB.
When a CFP feed poll throughput control config includes
throughputBucket, CFP now enables server-side throughput control for the configured group instead of only using local/client-side throughput control. This is implemented for both PK-range and EPK-range CFP paths.Also adds unit coverage for both CFP paths and updates the Cosmos changelog.
Fixes #49487
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines