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) (elastic#7008)
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. (cherry picked from commit bc225fb)
- Loading branch information