Skip to content

Conversation

@kruskall
Copy link
Member

What does this PR do?

replace bool with atomic.Bool to avoid race condition with multiple goroutines accessing the variables

Why is it important?

tests with race detector will fail

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.md

Author's Checklist

  • [ ]

Related issues

Discovered in #232

replace bool with atomic.Bool to avoid race condition with multiple
goroutines accessing the variables
@kruskall kruskall requested a review from a team as a code owner June 13, 2025 13:01
@kruskall kruskall requested review from mauri870 and rdner and removed request for a team June 13, 2025 13:01
@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Jun 15, 2025
@kruskall kruskall enabled auto-merge (squash) June 16, 2025 13:21
@kruskall kruskall merged commit bbca5fd into elastic:main Jun 16, 2025
5 checks passed
@kruskall kruskall deleted the test/TestSystemMetricsReport-race branch June 16, 2025 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants