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: Fix ToString() to not grow exponentially with retries #1539

Merged
merged 4 commits into from
May 19, 2020

Conversation

j82w
Copy link
Contributor

@j82w j82w commented May 19, 2020

Pull Request Template

Description

This fixes a bug in the diagnostics where a circle reference was created causing the diagnostics ToString() to grow exponentially.

The CosmosClientSideRequestStatistics directly adds the content to the CosmosDiagnostics. Some of the DocumentClientExceptions include the IClientSideRequestStatistics in the message which would then call the CosmosDiagnostic.ToString(). The CosmosDiagnostic records each DocumentClientExceptions and adds the message to it's records creating a circle reference.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

@j82w j82w added bug Something isn't working Diagnostics Issues around diagnostics and troubleshooting labels May 19, 2020
@j82w j82w self-assigned this May 19, 2020
@kirankumarkolli kirankumarkolli changed the title Diagnostics: Fix bug caused string to grow exponentially on retries Diagnostics: Fix ToString() growing exponentially with retries May 19, 2020
@j82w j82w changed the title Diagnostics: Fix ToString() growing exponentially with retries Diagnostics: Fix ToString() to not grow exponentially with retries May 19, 2020
@j82w j82w merged commit 7a4b0dd into master May 19, 2020
@j82w j82w deleted the users/jawilley/diagnostics/size_fix branch May 19, 2020 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Diagnostics Issues around diagnostics and troubleshooting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants