mirror of https://github.com/apache/lucene.git
Revert "SOLR-11882: SolrMetric registries retain references to SolrCores when closed"
This reverts commit f0509c19c1
.
This commit is contained in:
parent
f0854ce11f
commit
8418081c4a
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue