Skip to content

Cherry-pick #12063 to 7.1: Fix memory leak in Filebeat pipeline acker#12137

Merged
exekias merged 2 commits intoelastic:7.1from
exekias:backport_12063_7.1
May 10, 2019
Merged

Cherry-pick #12063 to 7.1: Fix memory leak in Filebeat pipeline acker#12137
exekias merged 2 commits intoelastic:7.1from
exekias:backport_12063_7.1

Conversation

@exekias
Copy link
Copy Markdown
Contributor

@exekias exekias commented May 9, 2019

Cherry-pick of PR #12063 to 7.1 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 requested a review from a team as a code owner May 9, 2019 14:10
@exekias exekias merged commit a63cb6b into elastic:7.1 May 10, 2019
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…e acker (elastic#12137)

* Fix memory leak in Filebeat pipeline acker (elastic#12063)

* 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 9dc1f39)

* Update CHANGELOG.next.asciidoc
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.

4 participants