Skip to content

Fixes race condition that can cause InvalidOperationException in CosmosOperationCancelledException.ToString()#5421

Closed
FabianMeiswinkel wants to merge 33 commits intomasterfrom
users/fabianm/fix66334029
Closed

Fixes race condition that can cause InvalidOperationException in CosmosOperationCancelledException.ToString()#5421
FabianMeiswinkel wants to merge 33 commits intomasterfrom
users/fabianm/fix66334029

Conversation

@FabianMeiswinkel
Copy link
Copy Markdown
Member

Pull Request Template

Description

Fixes race condition that can cause InvalidOperationException in CosmosOperationCancelledException.ToString() - especially when cross-regional hedging is enabled and E2E timeouts happen (CancellationToken being cancelled).

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

Closing issues

ICM#66334029

To automatically close an issue: closes #IssueNumber

Copilot AI and others added 30 commits August 1, 2025 19:25
…concurrent access

Co-authored-by: kirankumarkolli <6880899+kirankumarkolli@users.noreply.github.com>
…tion points

Co-authored-by: kirankumarkolli <6880899+kirankumarkolli@users.noreply.github.com>
…tions

Co-authored-by: kirankumarkolli <6880899+kirankumarkolli@users.noreply.github.com>
Since isBeingWalked flag prevents modifications during enumeration, snapshot methods are no longer needed. The trace system now uses direct enumeration with walking state protection instead of creating copies.

Co-authored-by: kirankumarkolli <6880899+kirankumarkolli@users.noreply.github.com>
…mosTraceDiagnostics

Co-authored-by: kirankumarkolli <6880899+kirankumarkolli@users.noreply.github.com>
Co-authored-by: kirankumarkolli <6880899+kirankumarkolli@users.noreply.github.com>
…move parameter

Co-authored-by: kirankumarkolli <6880899+kirankumarkolli@users.noreply.github.com>
… adjust assignment order

Co-authored-by: kirankumarkolli <6880899+kirankumarkolli@users.noreply.github.com>
…as started - but instead just operate on cloned snapshots
Copy link
Copy Markdown

@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.

Please follow the required format: "[Internal] Category: (Adds|Fixes|Refactors|Removes) Description"

Internal should be used for PRs that have no customer impact. This flag is used to help generate the changelog to know which PRs should be included. Examples:
Diagnostics: Adds GetElapsedClientLatency to CosmosDiagnostics
PartitionKey: Fixes null reference when using default(PartitionKey)
[v4] Client Encryption: Refactors code to external project
[Internal] Query: Adds code generator for CosmosNumbers for easy additions in the future.

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.

3 participants