Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick #12063 to 7.0: Fix memory leak in Filebeat pipeline acker #12140

Merged
merged 2 commits into from
May 10, 2019

Conversation

exekias
Copy link
Contributor

@exekias exekias commented May 9, 2019

Cherry-pick of PR #12063 to 7.0 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:28
@exekias exekias merged commit 4ab7dce into elastic:7.0 May 10, 2019
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…e acker (elastic#12140)

* 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.

3 participants