Skip to content

fix: compute rate under lock#928

Merged
KowalskiThomas merged 1 commit intomasterfrom
dd/kowalski/fix/max-sample-metric-rate-race-condition
Mar 31, 2026
Merged

fix: compute rate under lock#928
KowalskiThomas merged 1 commit intomasterfrom
dd/kowalski/fix/max-sample-metric-rate-race-condition

Conversation

@KowalskiThomas
Copy link
Copy Markdown
Contributor

@KowalskiThomas KowalskiThomas commented Mar 28, 2026

What does this PR do?

This PR fixes a race condition in MaxSampleMetric.flush where the sample rate was computed outside the lock, causing it to be inconsistent with the number of samples obtained inside the lock.

@datadog-datadog-prod-us1

This comment was marked as outdated.

@datadog-datadog-prod-us1-2

This comment was marked as off-topic.

@KowalskiThomas KowalskiThomas added changelog/Fixed Fixed features results into a bug fix version bump and removed Bits AI labels Mar 30, 2026
Co-authored-by: KowalskiThomas <14239160+KowalskiThomas@users.noreply.github.com>
@KowalskiThomas KowalskiThomas force-pushed the dd/kowalski/fix/max-sample-metric-rate-race-condition branch from 1013509 to b14cca5 Compare March 31, 2026 08:09
@KowalskiThomas KowalskiThomas marked this pull request as ready for review March 31, 2026 08:19
@KowalskiThomas KowalskiThomas requested review from a team as code owners March 31, 2026 08:19
@KowalskiThomas KowalskiThomas merged commit af84067 into master Mar 31, 2026
13 checks passed
@KowalskiThomas KowalskiThomas deleted the dd/kowalski/fix/max-sample-metric-rate-race-condition branch March 31, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/Fixed Fixed features results into a bug fix version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants