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

Improvement to memory leak concerning SonarQubePlugin#actionBroadcastMap #53

Conversation

lkoe
Copy link

@lkoe lkoe commented Mar 28, 2019

This PR alleviates a memory leak around SonarQubePlugin#actionBroadcastMap.

The problem was reported here: https://community.sonarsource.com/t/memory-leaks-in-sonarqube-gradle-plugin-2-7-and-2-6-2/6165

This PR does not fully fix the issue, but improves upon the current situation by changing the map lookup key to the project name, instead of the full gradle projects.
This enables the gradle daemon to become memory stable again in our development environment.

@dbmeneses
Copy link
Contributor

Thanks for the PR. It would be better to use project's path as key instead of the name. According to javadoc: The project's name is not necessarily unique within a project hierarchy. You should use the getPath() method for a unique identifier for the project.
Could you please update the PR? I'll merge it then.

Copy link
Contributor

@dbmeneses dbmeneses left a comment

Choose a reason for hiding this comment

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

See last comment.

@lkoe lkoe force-pushed the feature/actionbroadcastmap-memory-leak-improvement branch from 2753161 to 43ca099 Compare March 28, 2019 10:24
@lkoe
Copy link
Author

lkoe commented Mar 28, 2019

I've made the requested changes.
Please note, however, that this is not a 100% proper fix, as there is still a leak (albeit smaller) on project paths and action instances kept in the map.

This fix only helps on keeping the gradle daemon stable for a longer time.

@dbmeneses dbmeneses merged commit 44a691e into SonarSource:master Mar 28, 2019
@dbmeneses
Copy link
Contributor

Noted @lkoe , I've created a ticket: https://jira.sonarsource.com/browse/SONARGRADL-61.

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