Cherry-pick #19459 to 7.8: [Filebeat] Fix reference leak in TCP and Unix socket inputs#19502
Conversation
|
Pinging @elastic/integrations-services (Team:Services) |
💚 Build SucceededExpand to view the summary
Build stats
Test stats 🧪
Steps errorsExpand to view the steps failures
|
|
something went wrong in the backport. |
…19459) The tcp and unix input sources were leaking references causing a memory leak. When an accepted connection ended inputsource/common.Closer was supposed to delete the pointer that it held to the connection, but due to a code error `delete` was being called on the wrong map. Instead of modifying the common.Closer I replaced it with a cancellable context.Context which is designed to propagate signals from parent to children and requires less code. (cherry picked from commit 61f4846)
14f4102 to
5e94d42
Compare
|
run tests |
|
run tests |
…P and Unix socket inputs (elastic#19502) * [Filebeat] Fix reference leak in TCP and Unix socket inputs (elastic#19459) The tcp and unix input sources were leaking references causing a memory leak. When an accepted connection ended inputsource/common.Closer was supposed to delete the pointer that it held to the connection, but due to a code error `delete` was being called on the wrong map. Instead of modifying the common.Closer I replaced it with a cancellable context.Context which is designed to propagate signals from parent to children and requires less code. (cherry picked from commit 8eb8ed7) * Update vendor and notice
Cherry-pick of PR #19459 to 7.8 branch. Original message:
What does this PR do?
The tcp and unix input sources were leaking references causing a memory leak.
When an accepted connection ended inputsource/common.Closer was
supposed to delete the pointer that it held to the connection, but due to a code
error
deletewas being called on the wrong map.Why is it important?
This fixes a memory leak with the tcp and unix inputs.
Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.