Skip to content

Commit

Permalink
Fix a race condition with the add_host_metadata processor (elastic#8223
Browse files Browse the repository at this point in the history
…) (elastic#8225)

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

closes elastic#8040

(cherry picked from commit b497720)
  • Loading branch information
ph authored and ruflin committed Sep 5, 2018
1 parent 90b7cc6 commit 5843970
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 @@ -42,6 +42,7 @@ https://github.com/elastic/beats/compare/v6.4.0...6.4[Check the HEAD diff]
- Replace index patterns in TSVB visualizations. {pull}7929[7929]
- 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 5843970

Please sign in to comment.