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

Diagnostics: Adds Api for getting all regions contacted by a request #2312

Merged
merged 11 commits into from
Mar 17, 2021

Conversation

asketagarwal
Copy link
Contributor

@asketagarwal asketagarwal commented Mar 16, 2021

Pull Request Template

Description

This Pr Adds a new public api to CosmosDiagnostics for getting all contacted regions by a request.

public abstract IReadOnlyList<(string RegionName, Uri Uri)> GetContactedRegions();

Example tuple:

("West US", "cdb-ms-prod-westus1-fdxx.documents.azure.com")

Closing issues

Closes #2141

j82w
j82w previously approved these changes Mar 16, 2021
ealsur
ealsur previously approved these changes Mar 16, 2021
Copy link
Member

@ealsur ealsur left a comment

Choose a reason for hiding this comment

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

Can we add an example of the Region Name format (would it show westus or West US?) to the Description?

@asketagarwal asketagarwal dismissed stale reviews from ealsur and j82w via 97dd07d March 16, 2021 16:50
@j82w j82w merged commit 8686eaa into master Mar 17, 2021
@j82w j82w deleted the users/askagarw/RegionsContacted branch March 17, 2021 01:09
j82w pushed a commit that referenced this pull request Jun 17, 2021
…egionsContacted in IClientSideRequestStatistics (#2562)

Issue introduced in #2312

The original RegionsContacted hashset was never getting set so it is always null. There are certain service unavailable code paths that check if multiple regions were contacted. Since the hashset is never set it is null and causing the null reference exceptions.
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.

None yet

3 participants