Skip to content

Conversation

@aavasthy
Copy link
Contributor

@aavasthy aavasthy commented Dec 18, 2025

Pull Request Template

Description

In ThinClient mode when endpoint refresh happens or request encounters a HttpRequestException , the ClientRetryPolicy triggers a location refresh by calling GlobalEndpointManager.RefreshLocationAsync(). This refresh fetches updated account information from the service. However, the refresh request was missing the thinclient endpoint discovery header (x-ms-cosmos-thinclient-endpoint-discovery).
Without this header, the service returned standard endpoint information instead of thin client-specific endpoint information. Due to this after a failover or endpoint refresh, the SDK was not receiving the correct thin client endpoints.
As part of this PR added thinclient header with refresh request for get database account info.
Tested this change for region failover scenario and tested it for endpoint manager refresh scenario.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Closing issues

To automatically close an issue: closes #5536

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!

@aavasthy aavasthy changed the title [Thin Client Integration]: Added thinclient header for refresh account data requests. [Thin Client Integration]: Adds thinclient header for refresh account data requests. Dec 18, 2025
@aavasthy aavasthy added the auto-merge Enables automation to merge PRs label Dec 29, 2025
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

Development

Successfully merging this pull request may close these issues.

[ThinClient Integration]: Missing thinclient header for refresh account data requests leads to stale endpoint information

3 participants