SOLR-11821: ConcurrentModificationException in SimSolrCloudTestCase.tearDown

This commit is contained in:
Shalin Shekhar Mangar 2018-01-08 14:04:11 +05:30
parent 7695544a5f
commit 3d8ef981cb
2 changed files with 11 additions and 6 deletions

View File

@ -88,6 +88,7 @@ Bug Fixes
* SOLR-11824: Fixed bucket ordering in distributed json.facet type:range when mincount>0 (hossman)
* SOLR-11821: ConcurrentModificationException in SimSolrCloudTestCase.tearDown (shalin)
Optimizations
----------------------

View File

@ -138,13 +138,17 @@ public class SimSolrCloudTestCase extends SolrTestCaseJ4 {
cluster.simGetOpCounts().forEach((k, cnt) -> log.info("##\t\t- " + String.format(Locale.ROOT, "%-14s %4d", k, cnt.get())));
log.info("######### Autoscaling event counts ###########");
TreeMap<String, Map<String, AtomicInteger>> counts = new TreeMap<>();
for (SolrInputDocument d : cluster.simGetSystemCollection()) {
if (!"autoscaling_event".equals(d.getFieldValue("type"))) {
continue;
List<SolrInputDocument> solrInputDocuments = cluster.simGetSystemCollection();
synchronized (solrInputDocuments) {
for (SolrInputDocument d : solrInputDocuments) {
if (!"autoscaling_event".equals(d.getFieldValue("type"))) {
continue;
}
counts.computeIfAbsent((String)d.getFieldValue("event.source_s"), s -> new TreeMap<>())
.computeIfAbsent((String)d.getFieldValue("stage_s"), s -> new AtomicInteger())
.incrementAndGet();
}
counts.computeIfAbsent((String)d.getFieldValue("event.source_s"), s -> new TreeMap<>())
.computeIfAbsent((String)d.getFieldValue("stage_s"), s -> new AtomicInteger())
.incrementAndGet();
}
counts.forEach((trigger, map) -> {
log.info("## * Trigger: " + trigger);