Skip to content

Cherry-pick #12063 to 6.8: Fix memory leak in Filebeat pipeline acker#12138

Merged
exekias merged 2 commits intoelastic:6.8from
exekias:backport_12063_6.8
May 10, 2019
Merged

Cherry-pick #12063 to 6.8: Fix memory leak in Filebeat pipeline acker#12138
exekias merged 2 commits intoelastic:6.8from
exekias:backport_12063_6.8

Conversation

@exekias
Copy link
Copy Markdown
Contributor

@exekias exekias commented May 9, 2019

Cherry-pick of PR #12063 to 6.8 branch. Original message:

Before this change acker goroutine was kept forever as processed events
count was not correctly updated.

Filebeat sends an empty event to update file states, this event is not
published, but treated as dropped, without updating counters.

This change makes sures that a.events counter is updated for dropped
events too, so the acker gets closed (and freed) after all ACKs happen.

Original work by @jsoriano (#11810), and input from @urso, thank you both!

* Fix memory leak in Filebeat pipeline acker

Before this change acker goroutine was kept forever as processed events
count was not correctly updated.

Filebeat sends an empty event to update file states, this event is not
published, but treated as dropped, without updating counters.

This change makes sures that `a.events` count gets updated for dropped
events also, so the acker gets closed after all ACKs happen.

(cherry picked from commit 9653105)
@exekias exekias merged commit d592918 into elastic:6.8 May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants