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

Fix race condition in MainMonitor #830

Merged
merged 10 commits into from
Nov 27, 2024
Merged

Conversation

msft-paddy14
Copy link
Contributor

There's a race b/w the MainMonitor task which tries to reset the latency and connection dispose path which returns the latency object after setting it to null. Under high connection dispose rate, this issue becomes visible and throws below error. Adding a lock to protect dispose. Ideally there should be handled with all public methods but based on current model only alternate code path is metrics thread, so albeit hacky, this is a solution preventing the race.
image

Copy link
Contributor

@vazois vazois left a comment

Choose a reason for hiding this comment

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

Please correct minor formatting issue

libs/server/Metrics/Latency/GarnetLatencyMetricsSession.cs Outdated Show resolved Hide resolved
@vazois vazois requested review from vazois November 25, 2024 23:13
Copy link
Contributor

@vazois vazois left a comment

Choose a reason for hiding this comment

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

Please correct minor formatting issue

@badrishc badrishc merged commit 8ffc705 into main Nov 27, 2024
17 checks passed
@badrishc badrishc deleted the users/padgupta/fix_latency_dispose branch November 27, 2024 17:21
@github-actions github-actions bot locked and limited conversation to collaborators Jan 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants