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
Fix a race between updating the host data structure and the
serialization of events to json.

closes elastic#8040
  • Loading branch information
ph authored Sep 5, 2018
1 parent a12246e commit 415715d
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 @@ -43,6 +43,7 @@ https://github.com/elastic/beats/compare/v6.4.0...master[Check the HEAD diff]
- Replace index patterns in TSVB visualizations. {pull}7929[7929]
- Fixed Support `add_docker_metadata` in Windows by identifying systems' path separator. {issue}7797[7797]
- Add backoff support to x-pack monitoring outputs. {issue}7966[7966]
- 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 415715d

Please sign in to comment.