From 4921f135763e56038d2d5398d270aea463594691 Mon Sep 17 00:00:00 2001 From: Alan Woodward Date: Mon, 9 Nov 2015 15:24:42 +0000 Subject: [PATCH] SOLR-8255: MiniSolrCloudCluster should use a thread-safe list to hold its child nodes git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1713457 13f79535-47bb-0310-9956-ffa450edef68 --- solr/CHANGES.txt | 3 +++ .../src/java/org/apache/solr/cloud/MiniSolrCloudCluster.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 2a7283afca6..f25e600fd1f 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -348,6 +348,9 @@ Bug Fixes * SOLR-8223: Avoid accidentally swallowing OutOfMemoryError (in LeaderInitiatedRecoveryThread.java or CoreContainer.java) (Mike Drob via Christine Poerschke) +* SOLR-8255: MiniSolrCloudCluster needs to use a thread-safe list to keep track + of its child nodes (Alan Woodward) + Optimizations ---------------------- diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/MiniSolrCloudCluster.java b/solr/test-framework/src/java/org/apache/solr/cloud/MiniSolrCloudCluster.java index 7f0c54813ad..205ce8178da 100644 --- a/solr/test-framework/src/java/org/apache/solr/cloud/MiniSolrCloudCluster.java +++ b/solr/test-framework/src/java/org/apache/solr/cloud/MiniSolrCloudCluster.java @@ -26,11 +26,11 @@ import java.nio.file.Path; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; -import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.SortedMap; import java.util.concurrent.Callable; +import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; @@ -89,7 +89,7 @@ public class MiniSolrCloudCluster { private final ZkTestServer zkServer; private final boolean externalZkServer; - private final List jettys = new LinkedList<>(); + private final List jettys = new CopyOnWriteArrayList<>(); private final Path baseDir; private final CloudSolrClient solrClient; private final JettyConfig jettyConfig;