Skip to content

Fix TryGetLocationForGatewayDiagnostics to use server-side multi-master setting#5640

Draft
Copilot wants to merge 2 commits intousers/nalutripician/issue-5095-contacted-regions-hub-fallbackfrom
copilot/sub-pr-5618
Draft

Fix TryGetLocationForGatewayDiagnostics to use server-side multi-master setting#5640
Copilot wants to merge 2 commits intousers/nalutripician/issue-5095-contacted-regions-hub-fallbackfrom
copilot/sub-pr-5618

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 25, 2026

TryGetLocationForGatewayDiagnostics was gated on CanUseMultipleWriteLocations(), which requires both the client opt-in (UseMultipleWriteLocations) and the account setting (EnableMultipleWriteLocations). This caused the method to return null for the region name when using a multi-master account with the client opt-in disabled — a valid configuration that should still produce correct diagnostics.

Changes

  • LocationCache.cs: Replace CanUseMultipleWriteLocations() with this.enableMultipleWriteLocations in TryGetLocationForGatewayDiagnostics. The hub write region fallback for the default endpoint is an account-topology concern, not a client routing policy concern.

  • LocationCacheTests.cs: Add ValidateTryGetLocationForGatewayDiagnosticsOnDefaultEndpointForMultiMasterWithClientOptOut to cover the previously untested asymmetric case: account has EnableMultipleWriteLocations = true but client has UseMultipleWriteLocations = false.

// Before: returned null regionName when client opt-in was disabled,
// even though the account was multi-master
if (this.CanUseMultipleWriteLocations())  // requires client opt-in AND account setting

// After: keyed on account/server setting only
if (this.enableMultipleWriteLocations)

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…WriteLocations instead of CanUseMultipleWriteLocations

Co-authored-by: NaluTripician <27316859+NaluTripician@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP Address feedback on diagnostics null contacted region name Fix TryGetLocationForGatewayDiagnostics to use server-side multi-master setting Feb 25, 2026
@NaluTripician
Copy link
Copy Markdown
Contributor

Hi @NaluTripician — this PR has been idle for ~62 days. (Copilot-authored sub-PR of #5618, which you own) What's the current ETA / status? Flagging as part of an open-PR cleanup pass; if it's no longer being pursued we can close it. No auto-close — just looking for a status update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants