Revert "SOLR-11882: SolrMetric registries retain references to SolrCores when closed"

This reverts commit f0509c19c1.
This commit is contained in:
Andrzej Bialecki 2018-02-01 17:35:03 +01:00
parent f0854ce11f
commit 8418081c4a
1 changed files with 0 additions and 7 deletions

View File

@ -20,7 +20,6 @@ import java.io.Closeable;
import java.io.IOException;
import java.lang.invoke.MethodHandles;
import com.codahale.metrics.Gauge;
import com.codahale.metrics.MetricRegistry;
import org.apache.solr.cloud.CloudDescriptor;
import org.apache.solr.common.util.Utils;
@ -151,12 +150,6 @@ public class SolrCoreMetricManager implements Closeable {
if (getLeaderRegistryName() != null) {
metricManager.closeReporters(getLeaderRegistryName(), tag);
}
MetricRegistry metricRegistry = getRegistry();
metricRegistry.getGauges().forEach((k, v) -> {
Object val = v.getValue();
metricRegistry.remove(k);
metricRegistry.register(k, (Gauge)() -> val);
});
}
public SolrCore getCore() {