Skip to content
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

Direct Package Upgrade: Fixes Cosmos.Direct Package to 3.36.0 #4687

Conversation

kundadebdatta
Copy link
Member

@kundadebdatta kundadebdatta commented Sep 13, 2024

Pull Request Template

Description

This PR is bumping up the Cosmos.Direct package version from 3.35.0 to 3.36.0, which includes the below changes:

  • QuorumReader: Strong consistency with invalid (LSN -1) service responses: Adds the LSN verification to the path that ReadsMultipleReplicas and ReadPrimary involved in Strong/Bounded quorum to make sure that the responses are treated as errors and propagated above.
  • Fixes an use case where PartitionKey.None.GetHashCode() throws NullReferenceException.
  • GoneAndRetryWithRequestRetryPolicy - Refactors policy to throw 503 Service Unavailable when a 410 Gone Exception with Sub-Status code 1022 is Received.

Understanding Gone Exception (Status Code: 410) with Lease Not Found (Sub Status Code: 1022).

Background: In general 410/1022 is used as a signal to indicate that a region is not part of the dynamic quorum - meaning in global strong with dynamic quorum all reads from the secondary region kicked out of the quorum will return 410/1022.

  • Today when a read region loses the read lease it returns 410/LeaseNotFound - the client will then retry locally for up-to 60 seconds (for global strong) and up-to 30 seconds (for others) (catch-all 410 retry like for 410/0 or connectivity related 410) for any.
    Instead the 410/LeaseNotFound(1022) should be mapped immediately to a 503 to allow the cross-regional retry to happen as quickly as possible. Retrying in the next preferred region like usual for reads is acceptable. This has been taken care in the Cosmos.Direct release 3.36.0 and this PR is upgrading the Cosmos.Direct version to 3.36.0 to reflect the change.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Closing issues

To automatically close an issue: closes #4390

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

All good!

@kundadebdatta kundadebdatta changed the title Bump up the cosmos.direct package version. [Internal] Direct Version: Adds Code to Bump Up the Cosmos.Direct Package Version Sep 13, 2024
@kirankumarkolli
Copy link
Member

Updates Documents.Client .NET target framework to net6.0.
nit: framework is different from .NET 6
This is not a functional change right? It's just build system change.

@kundadebdatta kundadebdatta changed the title [Internal] Direct Version: Adds Code to Bump Up the Cosmos.Direct Package Version [Internal] Direct Package Upgrade: Refactors Code to Bump Up Cosmos.Direct Package to 3.36.0 Sep 13, 2024
@kundadebdatta kundadebdatta self-assigned this Sep 13, 2024
@kundadebdatta kundadebdatta added the auto-merge Enables automation to merge PRs label Sep 13, 2024
@kirankumarkolli kirankumarkolli changed the title [Internal] Direct Package Upgrade: Refactors Code to Bump Up Cosmos.Direct Package to 3.36.0 Direct Package Upgrade: Refactors Code to Bump Up Cosmos.Direct Package to 3.36.0 Sep 13, 2024
@kirankumarkolli kirankumarkolli changed the title Direct Package Upgrade: Refactors Code to Bump Up Cosmos.Direct Package to 3.36.0 Direct Package Upgrade: Fixes Cosmos.Direct Package to 3.36.0 Sep 13, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot merged commit c708fda into master Sep 13, 2024
26 of 27 checks passed
@microsoft-github-policy-service microsoft-github-policy-service bot deleted the users/kundadebdatta/4390_cross_regional_retry_on_410_1022 branch September 13, 2024 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge Enables automation to merge PRs
Projects
None yet
4 participants