mirror of https://github.com/apache/lucene.git
SOLR-9392: Fixed CDCR Test failures which were due to leaked resources
This commit is contained in:
parent
678d3f007a
commit
bfee2292a3
|
@ -236,6 +236,8 @@ Other Changes
|
|||
|
||||
* SOLR-9353: Factor out ReRankQParserPlugin.ReRankQueryRescorer private class. (Christine Poerschke)
|
||||
|
||||
* SOLR-9392: Fixed CDCR Test failures which were due to leaked resources. (shalin)
|
||||
|
||||
================== 6.1.0 ==================
|
||||
|
||||
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
|
||||
|
|
|
@ -49,6 +49,7 @@ import org.apache.solr.common.cloud.ZkStateReader;
|
|||
import org.apache.solr.common.params.CollectionParams;
|
||||
import org.apache.solr.common.params.CommonParams;
|
||||
import org.apache.solr.common.params.ModifiableSolrParams;
|
||||
import org.apache.solr.common.util.IOUtils;
|
||||
import org.apache.solr.common.util.NamedList;
|
||||
import org.apache.solr.common.util.StrUtils;
|
||||
import org.apache.solr.common.util.Utils;
|
||||
|
@ -667,6 +668,14 @@ public class BaseCdcrDistributedZkTest extends AbstractDistribZkTestBase {
|
|||
}
|
||||
}
|
||||
|
||||
List<CloudJettyRunner> oldRunners = this.cloudJettys.putIfAbsent(collection, cloudJettys);
|
||||
if (oldRunners != null) {
|
||||
// must close resources for the old entries
|
||||
for (CloudJettyRunner oldRunner : oldRunners) {
|
||||
IOUtils.closeQuietly(oldRunner.client);
|
||||
}
|
||||
}
|
||||
|
||||
this.cloudJettys.put(collection, cloudJettys);
|
||||
this.shardToJetty.put(collection, shardToJetty);
|
||||
this.shardToLeaderJetty.put(collection, shardToLeaderJetty);
|
||||
|
|
Loading…
Reference in New Issue