Skip to content
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

[NU-1609] fixed: Nu runtime memory leak #5898

Merged
merged 5 commits into from
Apr 18, 2024
Merged

Conversation

mk-software-pl
Copy link
Contributor

Describe your changes

SynchronousExecutionContextAndIORuntime provides sync IORuntime. The runtime is rather dummy and there is no simple way to close it properly. We thought that there was no simple way to close it, but the closing is not required because it's a dummy. It figures out that it's not so true, because by default, during creation, MBean is registered. We don't need the monitoring functionality provided by the MBean, so we simply disable it before creating the sync IORuntime. Now, we consider it really a dummy one.

Checklist before merge

  • Related issue ID is placed at the beginning of PR title in [brackets] (can be GH issue or Nu Jira issue)
  • Code is cleaned from temporary changes and commented out lines
  • Parts of the code that are not easy to understand are documented in the code
  • Changes are covered by automated tests
  • Showcase in dev-application.conf added to demonstrate the feature
  • Documentation added or updated
  • Added entry in Changelog.md describing the change from the perspective of a public distribution user
  • Added MigrationGuide.md entry in the appropriate subcategory if introducing a breaking change
  • Verify that PR will be squashed during merge

@mk-software-pl mk-software-pl marked this pull request as ready for review April 18, 2024 12:07
@github-actions github-actions bot added the docs label Apr 18, 2024
Copy link
Contributor

@raphaelsolarski raphaelsolarski left a comment

Choose a reason for hiding this comment

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

Epic!

@mk-software-pl mk-software-pl merged commit 8a8f218 into staging Apr 18, 2024
19 checks passed
@mk-software-pl mk-software-pl deleted the bugfix/NU-1609 branch April 18, 2024 13:12
@@ -16,6 +16,7 @@
* [#5843](https://github.com/TouK/nussknacker/pull/5843) Added new endpoint to provide statistics URL
* [#5873](https://github.com/TouK/nussknacker/pull/5873) Handle list of the anonymous statistic URLs, and send them in the interval
* [#5889](https://github.com/TouK/nussknacker/pull/5889) Decision Table component parameters validation improvement
* [#5898](https://github.com/TouK/nussknacker/pull/5898) fixed Nu runtime memory leak
Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we will fix this later

// creation we clear the property (to not affect creating other /not existing currently/ IORuntimes). Note that
// we change here the global state, so this is not a bullet proof solution.
private def withDisableCatsTracingMode(create: => IORuntime): IORuntime = synchronized {
val tracingModePropertyName = "cats.effect.tracing.mode"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we declare this property at the beginning SynchronousExecutionContextAndIORuntime:

private val TracingModePropertyName = "cats.effect.tracing.mode"

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nope, IMO the current place of declaration is optimal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants