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

ClientSideRequestStatistics: Fixes NullReferenceException caused by RegionsContacted in IClientSideRequestStatistics #2562

Merged
merged 6 commits into from
Jun 17, 2021

Conversation

asketagarwal
Copy link
Contributor

@asketagarwal asketagarwal commented Jun 16, 2021

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.

https://msdata.visualstudio.com/CosmosDB/_git/CosmosDB?path=%2FProduct%2FMicrosoft.Azure.Documents%2FSharedFiles%2FGoneAndRetryWithRequestRetryPolicy.cs&version=GBmaster&line=183&lineEnd=184&lineStartColumn=1&lineEndColumn=1&lineStyle=plain&_a=contents

closes #2485

Copy link
Member

@FabianMeiswinkel FabianMeiswinkel left a comment

Choose a reason for hiding this comment

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

LGTM now...

@j82w j82w merged commit e840be9 into master Jun 17, 2021
@j82w j82w deleted the users/askagarw/regionscontactedfix branch June 17, 2021 17:09
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.

NullReferenceException in GoneAndRetryWithRequestRetryPolicy.TryHandleResponseSynchronously in SDK 3.18
4 participants