Skip to content

Commit

Permalink
Cherry-pick #8223 to 6.x: Fix a race condition with the add_host_meta…
Browse files Browse the repository at this point in the history
…data processor (#8238)

Cherry-pick of PR #8223 to 6.x branch. Original message: 

Fix a race between updating the host data structure and the
serialization of events to json.

closes #8040
  • Loading branch information
ph authored Sep 5, 2018
1 parent 60b6540 commit 1ec83ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ https://github.com/elastic/beats/compare/v6.4.0...6.x[Check the HEAD diff]
- Deregister pipeline loader callback when inputsRunner is stopped. {pull}[7893][7893]
- Add backoff support to x-pack monitoring outputs. {issue}7966[7966]
- Removed execute permissions systemd unit file. {pull}7873[7873]
- Fix a race condition with the `add_host_metadata` and the event serialization. {pull}8223[8223]

*Auditbeat*

Expand Down
2 changes: 1 addition & 1 deletion libbeat/processors/add_host_metadata/add_host_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func newHostMetadataProcessor(cfg *common.Config) (processors.Processor, error)
// Run enriches the given event with the host meta data
func (p *addHostMetadata) Run(event *beat.Event) (*beat.Event, error) {
p.loadData()
event.Fields.DeepUpdate(p.data)
event.Fields.DeepUpdate(p.data.Clone())
return event, nil
}

Expand Down

0 comments on commit 1ec83ef

Please sign in to comment.