-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Autodiscover memleak #41748
base: main
Are you sure you want to change the base?
Autodiscover memleak #41748
Conversation
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
|
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
This is tested in a production environment and the leak seems completely resolved :) |
Proposed commit message
Fix memory leak in autodiscovery
Before this change, start events were never removed from memory due to a permanent reference to mapstr.Clone() object containing the full event
After this change, the event is freed from memory as soon as handle_start finishes, maintaining only the metadata of the even in memory
After a stop event, all existing references to the metadata of the stopped config are now removed from the autodiscover meta map
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Screenshots
Logs