[
https://issues.apache.org/jira/browse/SOLR-13677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16900152#comment-16900152
]
Andrzej Bialecki commented on SOLR-13677:
------------------------------------------
The current patch really complicates the API and the expectations on the
implementors. I think we need a different strategy.
How about the following:
* in {{SolrMetricProducer}} instead of using {{AutoCloseable.close()}} simply
add a different default method eg. {{unregisterMetrics()}}. Chances are that
many of existing components already implement {{close()}} so the implementors
will not be aware that they need to also unregister the component's metrics.
* I don't think we should expose {{GaugeWrapper}} outside of SolrMetricManager,
this is really an internal detail. Adding the method above should be sufficient
to explicitly unregister the metrics - and all {{SolrInfoBean}}-s already know
what metric names (and what tag) they registered, because the tag is passed in
{{initializeMetrics}} and the names are recorded in {{registerMetricName}}.
> All Metrics Gauges should be unregistered by the objects that registered them
> -----------------------------------------------------------------------------
>
> Key: SOLR-13677
> URL: https://issues.apache.org/jira/browse/SOLR-13677
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Components: metrics
> Reporter: Noble Paul
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The life cycle of Metrics producers are managed by the core (mostly). So, if
> the lifecycle of the object is different from that of the core itself, these
> objects will never be unregistered from the metrics registry. This will lead
> to memory leaks
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]