Skip to content

Commit

Permalink
Fix race condition when enriching events with Kubernetes metadata (#9067
Browse files Browse the repository at this point in the history
)
  • Loading branch information
jsoriano authored Nov 14, 2018
1 parent a8230bf commit 936949d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ https://github.com/elastic/beats/compare/v6.4.0...master[Check the HEAD diff]

- Fix golang.heap.gc.cpu_fraction type from long to float in Golang module. {pull}7789[7789]
- Add missing namespace field in http server metricset {pull}7890[7890]
- Fix race condition when enriching events with kubernetes metadata. {issue}9055[9055] {issue}9067[9067]

*Packetbeat*

Expand Down
2 changes: 2 additions & 0 deletions metricbeat/module/kubernetes/util/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ func (m *enricher) Stop() {
}

func (m *enricher) Enrich(events []common.MapStr) {
m.RLock()
defer m.RUnlock()
for _, event := range events {
if meta := m.metadata[m.index(event)]; meta != nil {
event.DeepUpdate(common.MapStr{
Expand Down

0 comments on commit 936949d

Please sign in to comment.