Skip to content

fix new dashboard memory leak#64154

Merged
Dosant merged 1 commit intoelastic:masterfrom
Dosant:dev/dashboard-memory-leak
Apr 22, 2020
Merged

fix new dashboard memory leak#64154
Dosant merged 1 commit intoelastic:masterfrom
Dosant:dev/dashboard-memory-leak

Conversation

@Dosant
Copy link
Copy Markdown
Contributor

@Dosant Dosant commented Apr 22, 2020

Summary

Following up on #61611 (comment)

After deangularizing navbar there was a weird test failure caused by new error in console: embeddable was destroyed. To reproduce it you had to:

  1. go to dashboard
  2. go to discover
  3. get back to dashboard
  4. change time in time picker -> embeddable was destroyed in console

This was fixed by stoping calling dashboardContainer.destroy(). But I think this means, that we never clean up embeddables after navigating away from dashboard without page reload. #61611 (comment)

This pr returns dashboardContainer.destroy() and adds addition logic for manually unmounting navbar. This should clean up all subscriptions on navigating away. I think previously this was just handled by angular directive

So I think the embeddable was destroyed in previous pr was because:

  1. Embeddable was destroyed in container
  2. when we navigated away we didn't destroy old instance of navbar. when time range get updated afterwards it still was listening to it and tried to notify destroyed dashboard.

Let's see if tests pass with this 🙏

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@Dosant Dosant requested a review from majagrubic April 22, 2020 10:10
@Dosant Dosant added bug Fixes for quality problems that affect the customer experience Feature:Dashboard Dashboard related features Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// labels Apr 22, 2020
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@Dosant Dosant added release_note:skip Skip the PR/issue when compiling release notes v7.8.0 v8.0.0 labels Apr 22, 2020
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@Dosant Dosant marked this pull request as ready for review April 22, 2020 11:52
@Dosant Dosant requested a review from a team April 22, 2020 11:52
Copy link
Copy Markdown
Contributor

@majagrubic majagrubic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanx so much for doing this 🙌 🚢

@Dosant Dosant merged commit 2f75810 into elastic:master Apr 22, 2020
Dosant added a commit to Dosant/kibana that referenced this pull request Apr 22, 2020
Dosant added a commit that referenced this pull request Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Fixes for quality problems that affect the customer experience Feature:Dashboard Dashboard related features release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v7.8.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants