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 #16440 to 7.6: [libbeat] Fix / clarify the module reload logic #16687

Merged
merged 2 commits into from
Mar 3, 2020

Conversation

faec
Copy link
Contributor

@faec faec commented Feb 28, 2020

Cherry-pick of PR #16440 to 7.6 branch. Original message:

What does this PR do?

The loop logic for the module reloader had a bug that would reload module configurations even if they hadn't changed. We suspect that in some cases this could cause unbounded memory consumption (we are still investigating the exact scope of the problem). This PR fixes the error and restructures the surrounding code to clarify the intended logic.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works

How to test this PR locally

With debug output on, any beat with module reloading enabled should output Number of module configs found: ... every time it reloads the configuration. Running a beat without this PR should show that this happens at every reload interval, whereas with it it should only reload when a file has changed.

@faec faec requested review from a team as code owners February 28, 2020 14:18
@faec faec requested a review from ruflin February 28, 2020 14:19
Copy link
Member

@ruflin ruflin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, changelog a bit less :-)

CHANGELOG.next.asciidoc Outdated Show resolved Hide resolved
@faec faec merged commit 19ca8b2 into elastic:7.6 Mar 3, 2020
@faec faec deleted the backport_16440_7.6 branch March 3, 2020 16:45
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.

2 participants