agent icon indicating copy to clipboard operation
agent copied to clipboard

Fix memory leak in loki.process on config update

Open ptodev opened this issue 1 year ago • 1 comments

PR Description

A goroutine wasn't being stopped in Update, which resulted in a memory leak.

The same change was also introduced to Alloy.

PR Checklist

  • [x] CHANGELOG.md updated
  • [ ] Documentation added
  • [x] Tests updated
  • [ ] Config converters updated

ptodev avatar Aug 20 '24 17:08 ptodev

Hi @thampiotr, would you mind reviewing the latest commit please? The unit tests kept being flaky, and I realised it's because the loki.process code needs to be improved further to shut down more gracefully. If you're happy with this change, I'll also open a PR for Alloy to have it.

ptodev avatar Aug 22 '24 10:08 ptodev