You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2016/08/08 02:17:15 UTC
lucene-solr:branch_6x: SOLR-9392: Fixed CDCR Test failures which were
due to leaked resources (cherry picked from commit bfee229)
Repository: lucene-solr
Updated Branches:
refs/heads/branch_6x 35e41604b -> a2993363b
SOLR-9392: Fixed CDCR Test failures which were due to leaked resources
(cherry picked from commit bfee229)
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/a2993363
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/a2993363
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/a2993363
Branch: refs/heads/branch_6x
Commit: a2993363b58b255454b85f3ea1dda6d32a681229
Parents: 35e4160
Author: Shalin Shekhar Mangar <sh...@apache.org>
Authored: Mon Aug 8 07:25:10 2016 +0530
Committer: Shalin Shekhar Mangar <sh...@apache.org>
Committed: Mon Aug 8 07:47:08 2016 +0530
----------------------------------------------------------------------
solr/CHANGES.txt | 2 ++
.../org/apache/solr/cloud/BaseCdcrDistributedZkTest.java | 9 +++++++++
2 files changed, 11 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a2993363/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index ae79cca..dce3f5c 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -200,6 +200,8 @@ Other Changes
* SOLR-9209: extracting JdbcDataSource.createResultSetIterator() for extension (Kristine Jetzke via Mikhai Khludnev)
+* 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.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a2993363/solr/core/src/test/org/apache/solr/cloud/BaseCdcrDistributedZkTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/BaseCdcrDistributedZkTest.java b/solr/core/src/test/org/apache/solr/cloud/BaseCdcrDistributedZkTest.java
index fcd9abb..e355b79 100644
--- a/solr/core/src/test/org/apache/solr/cloud/BaseCdcrDistributedZkTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/BaseCdcrDistributedZkTest.java
@@ -50,6 +50,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;
@@ -665,6 +666,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);