-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Adding effective ReadConsistencyStrategy to CosmosDiagnosticsContext #45414
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
base: main
Are you sure you want to change the base?
Adding effective ReadConsistencyStrategy to CosmosDiagnosticsContext #45414
Conversation
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.
Pull Request Overview
The purpose of this PR is to add support for an effective ReadConsistencyStrategy in CosmosDiagnosticsContext and related diagnostics code.
- Added a new ReadConsistencyStrategy parameter to methods that create or manipulate CosmosDiagnosticsContext.
- Updated FeedOperationState, DiagnosticsProvider, CosmosAsyncContainer, and CosmosAsyncClient to incorporate read consistency strategy logic.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
ImplementationBridgeHelpers.java | Added ReadConsistencyStrategy parameter to create method and interface definition. |
FeedOperationState.java | Extracted and computed effective read consistency strategy from request options. |
DiagnosticsProvider.java | Propagated read consistency strategy from request options to diagnostics context. |
CosmosDiagnosticsContext.java | Stored and exposed the read consistency strategy with added null-check and toString logging. |
CosmosAsyncContainer.java | Passed effective read consistency strategy from request options into policy application. |
CosmosAsyncClient.java | Added logic for determining effective read consistency strategy under various conditions. |
sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosDiagnosticsContext.java
Show resolved
Hide resolved
sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncClient.java
Show resolved
Hide resolved
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
/azp run java - cosmos - tests |
1 similar comment
/azp run java - cosmos - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run java - cosmos - tests |
/azp run java - cosmos - kafka |
/azp run java - cosmos - spark |
Azure Pipelines successfully started running 1 pipeline(s). |
2 similar comments
Azure Pipelines successfully started running 1 pipeline(s). |
Azure Pipelines successfully started running 1 pipeline(s). |
sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java
Show resolved
Hide resolved
sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxGatewayStoreModel.java
Show resolved
Hide resolved
...e-cosmos-benchmark/src/test/java/com/azure/cosmos/benchmark/ReadMyWritesConsistencyTest.java
Show resolved
Hide resolved
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.
LGTM, thanks :)
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.
LGTM, thanks :)
/azp run java - cosmos - tests |
/azp run java - cosmos - kafka |
/azp run java - cosmos - spark |
Azure Pipelines successfully started running 1 pipeline(s). |
2 similar comments
Azure Pipelines successfully started running 1 pipeline(s). |
Azure Pipelines successfully started running 1 pipeline(s). |
Description
This PR adds information about the effective read consistency startegy used to the
CosmosDiagnosticsContext
to improve diagnostics. It also fixes a few test issues (flakiness etc.) identified in the CI pipeline executions validating the change.All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines