-
Notifications
You must be signed in to change notification settings - Fork 2k
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
CosmosDB: Session token optimization and ChangeFeedProcessor bug fixes #25492
Closed
Conversation
This file contains 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
By default we don't scope the global session token in Gateway when partition key ID is part of the request. For containers with a very large number of partitions and multi-region account setting, this can result in "Request headers too long" errors. The change is to look first at the current request's headers and if the request is scoped to one specific partition, we should also scope the session token to that specific partition. ChangeFeedProcessor related changes: when the renewer task is cancelled, we also need to close the processor task even if we are about to check-point the current state. The cange also ensures that any exceptions are prioritized accordinally. Added more logs to CFP to allow for better monitoring of the current processing. Added test case for the scoped session token and simplified the existing CFP test.
milismsft
added
Cosmos
cosmos:v4-item
Indicates this feature will be shipped as part of V4 release train
labels
Nov 18, 2021
milismsft
requested review from
aayush3011,
FabianMeiswinkel,
kirankumarkolli,
kushagraThapar,
mbhaskar,
moderakh and
simplynaveen20
as code owners
November 18, 2021 04:40
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
simplynaveen20
requested changes
Nov 18, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per our discussion we have issue where gateway mode sending session token for every create request, please cover that issue
sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/SessionContainer.java
Show resolved
Hide resolved
sdk/cosmos/azure-cosmos/src/test/java/com/azure/cosmos/implementation/SessionContainerTest.java
Show resolved
Hide resolved
When the renewer task is cancelled, we also need to close the processor task even if we are about to check-point the current state. The change also ensures that any exceptions are prioritized accordingly. Added more logs to CFP to allow for better monitoring of the current processing. Update CFP test in order to simplify the logic.
changes were merged as part of different PRs |
azure-sdk
pushed a commit
to azure-sdk/azure-sdk-for-java
that referenced
this pull request
Sep 28, 2023
[Hub Generated] Review request for Microsoft.ContainerService/aks to add version preview/2023-08-02-preview (Azure#25891) * Adds base for updating Microsoft.ContainerService/aks from version preview/2023-07-02-preview to version 2023-08-02-preview * Updates readme * Updates API version in new specs and examples * update (Azure#25469) * Fix the IstioComponents structure (Azure#25492) * add netorkPolicy "none" (Azure#25511) * add netorkPolicy "none" value and description * add "none" enum value to networkPolicy * add addon autoscaling api (Azure#25479) * Update trusted access put and delete to async operation (Azure#25537) * Update trusted access put and delete to async operation * Update example * Update header * Swagger changes for adding autoscalerprofile flags for daemonset/multipleexpander (Azure#25487) * Adding json changes * adding "daemonsets" to the custom-words * Editing "Expander" to "expander" * Removing daemonset custom word from this pr. look at: Azure/azure-rest-api-specs#25533 * Add AzureServiceMesh example (Azure#25560) * Add AzureServiceMesh example * Fix AKV resource id format * enrich ASM examples (Azure#25598) --------- Co-authored-by: deveshdama <[email protected]> Co-authored-by: robogatikov <[email protected]> Co-authored-by: Chih-Sheng Huang <[email protected]> Co-authored-by: Tongyao Si <[email protected]> Co-authored-by: Youn Jae Kim <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
By default we don't scope the global session token in Gateway when partition key ID is part of the request. For containers with a very large number of partitions and multi-region account setting, this can result in "Request headers too long" errors.
The change is to look first at the current request's headers and if the request is scoped to one specific partition, we should also scope the session token to that specific partition. This change is primarily targeting the ChangeFeedProcessor implementation where it's confirmed that we set the partition key ID information as part of the header prior to adding the session token. A more general fix addressing any other cases is not within the scope of these changes.
ChangeFeedProcessor related changes: when the renewer task is cancelled, we also need to close the processor task even if we are about to check-point the current state. The change also ensures that any exceptions are prioritized accordingly.
Added more logs to CFP to allow for better monitoring of the current processing.
Added test case for the scoped session token and simplified the existing CFP test.
Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines