SOLR-11898: ConcurrentModificationException when calling org.apache.solr.core.SolrInfoBean.getMetricsSnapshot

This commit is contained in:
Erick Erickson 2018-02-12 19:25:13 -08:00
parent 034677d5ca
commit b5bf3b9c38
4 changed files with 9 additions and 6 deletions

View File

@ -200,6 +200,9 @@ Bug Fixes
* SOLR-10261: In case of in-place updates, failure in leader to follower replica update request now throws the
follower replica in leader-initiated-recovery (Ishan Chattopadhyaya, Steve Rowe)
* SOLR-11898: ConcurrentModificationException when calling org.apache.solr.core.SolrInfoBean.getMetricsSnapshot
(Jeff Miller via Erick Erickson)
Optimizations
----------------------

View File

@ -25,7 +25,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.lang.invoke.MethodHandles;
import java.util.HashSet;
import java.util.concurrent.ConcurrentHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
@ -60,7 +60,7 @@ public class FastLRUCache<K, V> extends SolrCacheBase implements SolrCache<K,V>
private long maxRamBytes;
private MetricsMap cacheMap;
private Set<String> metricNames = new HashSet<>();
private Set<String> metricNames = ConcurrentHashMap.newKeySet();
private MetricRegistry registry;
@Override

View File

@ -17,7 +17,7 @@
package org.apache.solr.search;
import java.lang.invoke.MethodHandles;
import java.util.HashSet;
import java.util.concurrent.ConcurrentHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
@ -65,7 +65,7 @@ public class LFUCache<K, V> implements SolrCache<K, V> {
private int showItems = 0;
private Boolean timeDecay = true;
private MetricsMap cacheMap;
private Set<String> metricNames = new HashSet<>();
private Set<String> metricNames = ConcurrentHashMap.newKeySet();
private MetricRegistry registry;
@Override

View File

@ -19,7 +19,7 @@ package org.apache.solr.search;
import java.lang.invoke.MethodHandles;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.concurrent.ConcurrentHashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
@ -87,7 +87,7 @@ public class LRUCache<K,V> extends SolrCacheBase implements SolrCache<K,V>, Acco
private Map<K,V> map;
private String description="LRU Cache";
private MetricsMap cacheMap;
private Set<String> metricNames = new HashSet<>();
private Set<String> metricNames = ConcurrentHashMap.newKeySet();
private MetricRegistry registry;
private long maxRamBytes = Long.MAX_VALUE;