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

#355 - Solr FilterCache Memory Leak - Replace SolrInfoBean in NRMetric with String #613

Merged
merged 5 commits into from
Dec 21, 2021

Conversation

GDownes
Copy link
Contributor

@GDownes GDownes commented Dec 15, 2021

Overview

Currently, the SolrMetricManager instrumentation in the solr-jmx-7.0.0 and solr-jmx-7.4.0 projects maintains a map of all tracked metrics using the MetricUtil class.
The SolrMetricManager instrumentation currently doesn't support removing metrics causing a memory leak.

This pull request adds additional instrumentation to the SolrMetricManager class to support removing metrics and renaming registries. It also reduces the memory footprint of the NRMetric class by replacing the SolrInfoBean used internally with a string. SolrInfoBean is only used to get the name of the bean which is now past directed as a string.

Related Github Issue

#355

Testing

Ran verifyInstrumentation successfully.
Ran GHA build checks successfully.
Added SolrMetricManager unit tests to cover newly supported scenarios.
Reproduced and resolved the issue on a local instance of Solr and monitored using New Relic One.

Checks

[X] Are your contributions backward compatible with relevant frameworks and APIs? Yes
[X] Does your code contain any breaking changes? Please describe. No
[X] Does your code introduce any new dependencies? Please describe. No

@GDownes GDownes marked this pull request as ready for review December 20, 2021 11:16
@meiao meiao linked an issue Dec 20, 2021 that may be closed by this pull request
@kford-newrelic kford-newrelic added this to Triage in Java Engineering Board via automation Dec 20, 2021
@kford-newrelic kford-newrelic moved this from Triage to Needs Review in Java Engineering Board Dec 20, 2021
@meiao meiao merged commit 7a72ab9 into main Dec 21, 2021
Java Engineering Board automation moved this from Needs Review to Done Dec 21, 2021
@GDownes GDownes deleted the #355-solr-filtercache-leak branch July 1, 2022 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Memory Leak when FilterCache is enabled in Solr
2 participants