forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix heartbeat races on event updates (elastic#6950)
Heartbeat has a many components, each adding fields to an existing event. As events are created per 'TaskRun', this is normally fine. But in case the TaskRunner branches of into multiple Sub-tasks, we will see races on shared event structures. This is the case with multiple ports in the http/tcp configuration or the IPAll setting (ping all known IPs of a given domain). Namespaces in an event can be potentially populated via globally shared structures. This can also lead to unwanted updates or races. This fix clones the event structure before continuing event updates, so to remove the chance of races.
Showing
2 changed files
with
9 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters