-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[Cosmos] Change default consistency level to the database account consistency level #22792
Conversation
API changes have been detected in |
API changes have been detected in |
/azp run python - cosmos - ci |
Azure Pipelines successfully started running 1 pipeline(s). |
Azure Pipelines successfully started running 1 pipeline(s). |
sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py
Outdated
Show resolved
Hide resolved
sdk/cosmos/azure-cosmos/azure/cosmos/_cosmos_client_connection.py
Outdated
Show resolved
Hide resolved
sdk/cosmos/azure-cosmos/azure/cosmos/aio/_cosmos_client_connection_async.py
Outdated
Show resolved
Hide resolved
look into changing python code docs here too: https://docs.microsoft.com/en-us/azure/cosmos-db/sql/how-to-manage-consistency?tabs=portal%2Cdotnetv2%2Capi-async#override-the-default-consistency-level |
…n consistency to start client session
…ded (thanks Jake!)
sdk/cosmos/azure-cosmos/samples/nonpartitioned_container_operations_async.py
Show resolved
Hide resolved
Kushagra improved documentation and comments Co-authored-by: Kushagra Thapar <[email protected]>
…-sdk-for-python into integrated-cache
This pull request is protected by Check Enforcer. What is Check Enforcer?Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass. Why am I getting this message?You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged. What should I do now?If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows: What if I am onboarding a new service?Often, new services do not have validation pipelines associated with them, in order to bootstrap pipelines for a new service, you can issue the following command as a pull request comment: |
/azp run python - cosmos - ci |
Azure Pipelines successfully started running 1 pipeline(s). |
sdk/cosmos/azure-cosmos/azure/cosmos/aio/_cosmos_client_connection_async.py
Show resolved
Hide resolved
sdk/cosmos/azure-cosmos/azure/cosmos/aio/_cosmos_client_connection_async.py
Show resolved
Hide resolved
sdk/cosmos/azure-cosmos/azure/cosmos/aio/_cosmos_client_connection_async.py
Outdated
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
…sistency level (Azure#22792) * consistency level gets set to default found in database account * async client default change * updated docs based on finding and updated samples to reflect best practices * Update CHANGELOG.md * Update README.md * Update README.md * Update README.md * Update CHANGELOG.md * formatting * formatting * updated consistency for first request to Eventual (lowest latency) * pylint * from_connection_string methods * from_connection_string2 * Update sdk/cosmos/azure-cosmos/README.md Co-authored-by: Gahl Levy <[email protected]> * Apply suggestions from code review Co-authored-by: Gahl Levy <[email protected]> * Update README.md * removed forceful header usage, changed setup to only check for Session consistency to start client session * need to set header if Session consistency for updating session if needed (thanks Jake!) * Apply suggestions from code review Kushagra improved documentation and comments Co-authored-by: Kushagra Thapar <[email protected]> * added test for session token * Update CHANGELOG.md * Update _cosmos_client_connection_async.py Co-authored-by: Gahl Levy <[email protected]> Co-authored-by: Kushagra Thapar <[email protected]>
{AzureMonitor} fixes Azure/azure-rest-api-specs#22716 fix the Metrics API version in the package-composite-v1 tag (Azure#22792) fixes Azure/azure-rest-api-specs#22716 fix the Metrics API version in the package-composite-v1 tag
These changes make it so the default consistency level that gets set when initializing clients becomes that of the database account, as opposed to the previous default (which was just "Session").
With these changes, the user can be sure that if they don't pass in a given consistency level their clients will run using the one present in their cosmos account. This also makes it easier for users seeking to try the dedicated gateway/ integrated cache since they won't have to specify for the clients to have a specific consistency when their account is set up to use these new features.