Skip to content

[8.x] [Lens][Embeddable] Fix memory leak on ES|QL variables subscription (#210826)#211171

Merged
kibanamachine merged 1 commit intoelastic:8.xfrom
kibanamachine:backport/8.x/pr-210826
Feb 14, 2025
Merged

[8.x] [Lens][Embeddable] Fix memory leak on ES|QL variables subscription (#210826)#211171
kibanamachine merged 1 commit intoelastic:8.xfrom
kibanamachine:backport/8.x/pr-210826

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…lastic#210826)

## Summary

This PR fixes a bug due to multiple subscription created by the ESQL
variables logic in the embeddable to never been cancelled.
The fix was to move the subscription in the loader module and make it
cleanup correctly together with other subscription.

Unit tests have been added to check the correct re-render behaviour.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit 34baecb)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Feb 14, 2025
@kibanamachine kibanamachine enabled auto-merge (squash) February 14, 2025 09:25
@kibanamachine kibanamachine merged commit 7c45530 into elastic:8.x Feb 14, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
lens 1.5MB 1.5MB -31.0B

cc @dej611

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants