-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
libbeat/publisher/pipeline: fix data races #19821
Conversation
Fix how we pass the initial queue consumer into eventConsumer.loop; we were referencing c.consumer in a background goroutine, which can race with updates to the consumer. Update tests to properly load atomic variables. Changed serially updated numEvents vars to basic, non-atomic types.
Pinging @elastic/integrations-services (Team:Services) |
💔 Tests FailedExpand to view the summary
Build stats
Test stats 🧪
Test errorsExpand to view the tests failures
Steps errorsExpand to view the steps failures
Log outputExpand to view the last 100 lines of log output
|
jenkins run the tests please |
Hm weird, Beats tests are run with
No changelog required. |
Test failures appear to be unrelated, merging. |
Fix how we pass the initial queue consumer into eventConsumer.loop; we were referencing c.consumer in a background goroutine, which can race with updates to the consumer. Update tests to properly load atomic variables. Changed serially updated numEvents vars to basic, non-atomic types. (cherry picked from commit ebacd3b)
* upstream/master: (25 commits) [Elastic Agent] Send checkin payload to Fleet (elastic#19857) [Ingest Manager] Fixed tests across agent elastic#19877 [Ingest Manager] Fix serialization test elastic#19876 Fix service start type mapping in windows/service metricset (elastic#19551) ci: Change comment trigger detection method (elastic#19827) Add 21 autogenerated filesets from rsa2elk devices (elastic#19713) [Ingest Manager] Agent config cleanup (elastic#19848) libbeat/publisher/pipeline: fix data races (elastic#19821) Update monitoring-internal-collection.asciidoc (elastic#19422) (elastic#19697) [Elastic Agent] Trust exchange endpoint must bind to 127.0.0.1 (elastic#19861) Specify an ECS version in Auditbeat/Packetbeat/Winlogbeat (elastic#19159) Add azure billing metricset (elastic#19207) Add support for appinsights in the metricbeat azure module (elastic#18940) Add MySQL query metricset with lightweight module and SQL helper (elastic#18955) [Ingest Manager] Refuse invalid stream values in configuration (elastic#19587) Do not use vendor during integration tests (elastic#19839) LIBBEAT: Enhancement Convert dissected values from String to other basic data types and IP (elastic#18683) [Elastic Agent] Remove support for "logs" and only support logfile (elastic#19761) [CI] support windows-2012 (elastic#19773) Do not update go.mod during packaging and testing (elastic#19823) ...
Fix how we pass the initial queue consumer into eventConsumer.loop; we were referencing c.consumer in a background goroutine, which can race with updates to the consumer. Update tests to properly load atomic variables. Changed serially updated numEvents vars to basic, non-atomic types. (cherry picked from commit ebacd3b)
Fix how we pass the initial queue consumer into eventConsumer.loop; we were referencing c.consumer in a background goroutine, which can race with updates to the consumer. Update tests to properly load atomic variables. Changed serially updated numEvents vars to basic, non-atomic types.
What does this PR do?
Fix how we pass the initial queue consumer into
eventConsumer.loop
;we were referencing c.consumer in a background goroutine, which can
race with updates to the consumer.
Update tests to properly load atomic variables. Changed serially updated
numEvents
vars to basic, non-atomic types.Why is it important?
I'm not sure if this particular data race would cause any issues in production,
but we (apm-server) rely on the race detector to pick up real issues. This is
causing our tests to fail.
Checklist
- [ ] I have commented my code, particularly in hard-to-understand areas- [ ] I have made corresponding changes to the documentation- [ ] I have made corresponding change to the default configuration files- [ ] I have added tests that prove my fix is effective or that my feature worksCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.(Does this change need a changelog entry? This is a fix to a recently merged change.)
How to test this PR locally
go test -race ./libbeat/publisher/pipeline