[ML] Preserve lost thread context in node inference action#132973
Merged
davidkyle merged 4 commits intoelastic:mainfrom Aug 15, 2025
Merged
[ML] Preserve lost thread context in node inference action#132973davidkyle merged 4 commits intoelastic:mainfrom
davidkyle merged 4 commits intoelastic:mainfrom
Conversation
Collaborator
|
Pinging @elastic/ml-core (Team:ML) |
Collaborator
|
Hi @davidkyle, I've created a changelog YAML for you. |
Member
Author
|
The thread context was meant to be preserved by this code However there are 2 problems with that:
Anomaly detection uses the same |
davidkyle
commented
Aug 15, 2025
jonathan-buttner
approved these changes
Aug 15, 2025
Contributor
jonathan-buttner
left a comment
There was a problem hiding this comment.
I tested this locally and it is working. Dave and I chatted about how to create a end to end test for this. We'll follow up on that later.
This was referenced Aug 15, 2025
davidkyle
added a commit
to davidkyle/elasticsearch
that referenced
this pull request
Aug 15, 2025
…32973) Fixes a memory leak if APM tracing is enabled as the lost context meant the trace was never closed and the span never released
davidkyle
added a commit
to davidkyle/elasticsearch
that referenced
this pull request
Aug 15, 2025
…32973) Fixes a memory leak if APM tracing is enabled as the lost context meant the trace was never closed and the span never released
Collaborator
davidkyle
added a commit
to davidkyle/elasticsearch
that referenced
this pull request
Aug 15, 2025
…32973) Fixes a memory leak if APM tracing is enabled as the lost context meant the trace was never closed and the span never released
davidkyle
added a commit
to davidkyle/elasticsearch
that referenced
this pull request
Aug 15, 2025
…32973) Fixes a memory leak if APM tracing is enabled as the lost context meant the trace was never closed and the span never released
elasticsearchmachine
pushed a commit
that referenced
this pull request
Aug 15, 2025
elasticsearchmachine
pushed a commit
that referenced
this pull request
Aug 15, 2025
elasticsearchmachine
pushed a commit
that referenced
this pull request
Aug 15, 2025
elasticsearchmachine
pushed a commit
that referenced
this pull request
Aug 15, 2025
javanna
pushed a commit
to javanna/elasticsearch
that referenced
this pull request
Aug 18, 2025
…32973) Fixes a memory leak if APM tracing is enabled as the lost context meant the trace was never closed and the span never released
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If APM tracing is enabled the lost context meant the trace was never stopped and the span never released. After many calls to the action this small memory leak can amount to a substantial amount of memory potentially causing out of memory errors.