You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2018/12/01 06:34:54 UTC
[1/4] lucene-solr:branch_7x: SOLR-13030: Update executor usage to
work correctly with Java 11 and update Mockito & HttpComponents to work with
Java 11 and fix get remote info retry to work across jvms better.
Repository: lucene-solr
Updated Branches:
refs/heads/branch_7x 2f6bdb594 -> 2968669c5
SOLR-13030: Update executor usage to work correctly with Java 11 and update Mockito & HttpComponents to work with Java 11 and fix get remote info retry to work across jvms better.
# Conflicts:
# solr/CHANGES.txt
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/a47b6400
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/a47b6400
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/a47b6400
Branch: refs/heads/branch_7x
Commit: a47b64000b227aae57636877b26f2aa2bc16e1f5
Parents: 2f6bdb5
Author: markrmiller <ma...@gmail.com>
Authored: Fri Nov 30 23:50:12 2018 -0600
Committer: markrmiller <ma...@apache.org>
Committed: Sat Dec 1 00:34:15 2018 -0600
----------------------------------------------------------------------
lucene/ivy-versions.properties | 14 ++--
lucene/licenses/httpclient-4.5.3.jar.sha1 | 1 -
lucene/licenses/httpclient-4.5.6.jar.sha1 | 1 +
lucene/licenses/httpcore-4.4.10.jar.sha1 | 1 +
lucene/licenses/httpcore-4.4.6.jar.sha1 | 1 -
...jetty-continuation-9.4.11.v20180605.jar.sha1 | 1 -
...jetty-continuation-9.4.14.v20181114.jar.sha1 | 1 +
.../jetty-http-9.4.11.v20180605.jar.sha1 | 1 -
.../jetty-http-9.4.14.v20181114.jar.sha1 | 1 +
.../licenses/jetty-io-9.4.11.v20180605.jar.sha1 | 1 -
.../licenses/jetty-io-9.4.14.v20181114.jar.sha1 | 1 +
.../jetty-server-9.4.11.v20180605.jar.sha1 | 1 -
.../jetty-server-9.4.14.v20181114.jar.sha1 | 1 +
.../jetty-servlet-9.4.11.v20180605.jar.sha1 | 1 -
.../jetty-servlet-9.4.14.v20181114.jar.sha1 | 1 +
.../jetty-util-9.4.11.v20180605.jar.sha1 | 1 -
.../jetty-util-9.4.14.v20181114.jar.sha1 | 1 +
solr/CHANGES.txt | 2 +-
.../client/solrj/embedded/JettySolrRunner.java | 33 +++++----
.../org/apache/solr/cloud/ZkController.java | 4 +-
.../org/apache/solr/core/CoreContainer.java | 22 +++---
.../org/apache/solr/cloud/OverseerTest.java | 51 ++++++++-----
solr/licenses/byte-buddy-1.6.2.jar.sha1 | 1 -
solr/licenses/byte-buddy-1.9.3.jar.sha1 | 1 +
solr/licenses/httpclient-4.5.3.jar.sha1 | 1 -
solr/licenses/httpclient-4.5.6.jar.sha1 | 1 +
solr/licenses/httpcore-4.4.10.jar.sha1 | 1 +
solr/licenses/httpcore-4.4.6.jar.sha1 | 1 -
solr/licenses/httpmime-4.5.3.jar.sha1 | 1 -
solr/licenses/httpmime-4.5.6.jar.sha1 | 1 +
...jetty-continuation-9.4.11.v20180605.jar.sha1 | 1 -
...jetty-continuation-9.4.14.v20181114.jar.sha1 | 1 +
.../jetty-deploy-9.4.11.v20180605.jar.sha1 | 1 -
.../jetty-deploy-9.4.14.v20181114.jar.sha1 | 1 +
.../jetty-http-9.4.11.v20180605.jar.sha1 | 1 -
.../jetty-http-9.4.14.v20181114.jar.sha1 | 1 +
.../licenses/jetty-io-9.4.11.v20180605.jar.sha1 | 1 -
.../licenses/jetty-io-9.4.14.v20181114.jar.sha1 | 1 +
.../jetty-jmx-9.4.11.v20180605.jar.sha1 | 1 -
.../jetty-jmx-9.4.14.v20181114.jar.sha1 | 1 +
.../jetty-rewrite-9.4.11.v20180605.jar.sha1 | 1 -
.../jetty-rewrite-9.4.14.v20181114.jar.sha1 | 1 +
.../jetty-security-9.4.11.v20180605.jar.sha1 | 1 -
.../jetty-security-9.4.14.v20181114.jar.sha1 | 1 +
.../jetty-server-9.4.11.v20180605.jar.sha1 | 1 -
.../jetty-server-9.4.14.v20181114.jar.sha1 | 1 +
.../jetty-servlet-9.4.11.v20180605.jar.sha1 | 1 -
.../jetty-servlet-9.4.14.v20181114.jar.sha1 | 1 +
.../jetty-servlets-9.4.11.v20180605.jar.sha1 | 1 -
.../jetty-servlets-9.4.14.v20181114.jar.sha1 | 1 +
.../jetty-util-9.4.11.v20180605.jar.sha1 | 1 -
.../jetty-util-9.4.14.v20181114.jar.sha1 | 1 +
.../jetty-webapp-9.4.11.v20180605.jar.sha1 | 1 -
.../jetty-webapp-9.4.14.v20181114.jar.sha1 | 1 +
.../jetty-xml-9.4.11.v20180605.jar.sha1 | 1 -
.../jetty-xml-9.4.14.v20181114.jar.sha1 | 1 +
solr/licenses/mockito-core-2.23.4.jar.sha1 | 1 +
solr/licenses/mockito-core-2.6.2.jar.sha1 | 1 -
solr/licenses/objenesis-2.5.jar.sha1 | 1 -
solr/licenses/objenesis-2.6.jar.sha1 | 1 +
solr/licenses/start.jar.sha1 | 2 +-
.../apache/solr/common/cloud/ZkStateReader.java | 1 +
.../solr/BaseDistributedSearchTestCase.java | 34 ++++-----
.../cloud/AbstractFullDistribZkTestBase.java | 75 ++++++++++++--------
64 files changed, 164 insertions(+), 128 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/lucene/ivy-versions.properties
----------------------------------------------------------------------
diff --git a/lucene/ivy-versions.properties b/lucene/ivy-versions.properties
index 982e92f..83c5446b 100644
--- a/lucene/ivy-versions.properties
+++ b/lucene/ivy-versions.properties
@@ -86,7 +86,7 @@ io.prometheus.version = 0.2.0
/mecab/mecab-ko-dic = 2.0.3-20170922
/mecab/mecab-naist-jdic = 0.6.3b-20111013
/net.arnx/jsonic = 1.2.7
-/net.bytebuddy/byte-buddy = 1.6.2
+/net.bytebuddy/byte-buddy = 1.9.3
/net.hydromatic/eigenbase-properties = 1.1.5
/net.sf.ehcache/ehcache-core = 2.4.4
@@ -166,9 +166,9 @@ org.apache.hadoop.version = 2.7.4
# The httpcore version is often different from the httpclient and httpmime versions,
# so the httpcore version value should not share the same symbolic name with them.
-/org.apache.httpcomponents/httpclient = 4.5.3
-/org.apache.httpcomponents/httpcore = 4.4.6
-/org.apache.httpcomponents/httpmime = 4.5.3
+/org.apache.httpcomponents/httpclient = 4.5.6
+/org.apache.httpcomponents/httpcore = 4.4.10
+/org.apache.httpcomponents/httpmime = 4.5.6
/org.apache.ivy/ivy = 2.4.0
@@ -245,7 +245,7 @@ org.codehaus.janino.version = 2.7.6
/org.codehaus.woodstox/stax2-api = 3.1.4
/org.codehaus.woodstox/woodstox-core-asl = 4.4.1
-org.eclipse.jetty.version = 9.4.11.v20180605
+org.eclipse.jetty.version = 9.4.14.v20181114
/org.eclipse.jetty/jetty-continuation = ${org.eclipse.jetty.version}
/org.eclipse.jetty/jetty-deploy = ${org.eclipse.jetty.version}
/org.eclipse.jetty/jetty-http = ${org.eclipse.jetty.version}
@@ -273,7 +273,7 @@ org.gagravarr.vorbis.java.version = 0.8
/org.locationtech.jts/jts-core = 1.15.0
/org.locationtech.spatial4j/spatial4j = 0.7
-/org.mockito/mockito-core = 2.6.2
+/org.mockito/mockito-core = 2.23.4
org.mortbay.jetty.version = 6.1.26
/org.mortbay.jetty/jetty = ${org.mortbay.jetty.version}
@@ -281,7 +281,7 @@ org.mortbay.jetty.version = 6.1.26
/org.mortbay.jetty/jetty-util = ${org.mortbay.jetty.version}
/org.noggit/noggit = 0.8
-/org.objenesis/objenesis = 2.5
+/org.objenesis/objenesis = 2.6
org.ow2.asm.version = 5.1
/org.ow2.asm/asm = ${org.ow2.asm.version}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/lucene/licenses/httpclient-4.5.3.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/httpclient-4.5.3.jar.sha1 b/lucene/licenses/httpclient-4.5.3.jar.sha1
deleted file mode 100644
index 415a080..0000000
--- a/lucene/licenses/httpclient-4.5.3.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-d1577ae15f01ef5438c5afc62162457c00a34713
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/lucene/licenses/httpclient-4.5.6.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/httpclient-4.5.6.jar.sha1 b/lucene/licenses/httpclient-4.5.6.jar.sha1
new file mode 100644
index 0000000..92b233e
--- /dev/null
+++ b/lucene/licenses/httpclient-4.5.6.jar.sha1
@@ -0,0 +1 @@
+1afe5621985efe90a92d0fbc9be86271efbe796f
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/lucene/licenses/httpcore-4.4.10.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/httpcore-4.4.10.jar.sha1 b/lucene/licenses/httpcore-4.4.10.jar.sha1
new file mode 100644
index 0000000..6f91546
--- /dev/null
+++ b/lucene/licenses/httpcore-4.4.10.jar.sha1
@@ -0,0 +1 @@
+acc54d9b28bdffe4bbde89ed2e4a1e86b5285e2b
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/lucene/licenses/httpcore-4.4.6.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/httpcore-4.4.6.jar.sha1 b/lucene/licenses/httpcore-4.4.6.jar.sha1
deleted file mode 100644
index 83cac99..0000000
--- a/lucene/licenses/httpcore-4.4.6.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-e3fd8ced1f52c7574af952e2e6da0df8df08eb82
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/lucene/licenses/jetty-continuation-9.4.11.v20180605.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/jetty-continuation-9.4.11.v20180605.jar.sha1 b/lucene/licenses/jetty-continuation-9.4.11.v20180605.jar.sha1
deleted file mode 100644
index 443533c..0000000
--- a/lucene/licenses/jetty-continuation-9.4.11.v20180605.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-31f1e347d013356317164b86bbbc2a6ce5c5e871
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/lucene/licenses/jetty-continuation-9.4.14.v20181114.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/jetty-continuation-9.4.14.v20181114.jar.sha1 b/lucene/licenses/jetty-continuation-9.4.14.v20181114.jar.sha1
new file mode 100644
index 0000000..0d9db3a
--- /dev/null
+++ b/lucene/licenses/jetty-continuation-9.4.14.v20181114.jar.sha1
@@ -0,0 +1 @@
+ac4981a61bcaf4e2538de6270300a870224a16b8
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/lucene/licenses/jetty-http-9.4.11.v20180605.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/jetty-http-9.4.11.v20180605.jar.sha1 b/lucene/licenses/jetty-http-9.4.11.v20180605.jar.sha1
deleted file mode 100644
index 76a024c..0000000
--- a/lucene/licenses/jetty-http-9.4.11.v20180605.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-20c35f5336befe35b0bd5c4a63e07170fe7872d7
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/lucene/licenses/jetty-http-9.4.14.v20181114.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/jetty-http-9.4.14.v20181114.jar.sha1 b/lucene/licenses/jetty-http-9.4.14.v20181114.jar.sha1
new file mode 100644
index 0000000..5e72e34
--- /dev/null
+++ b/lucene/licenses/jetty-http-9.4.14.v20181114.jar.sha1
@@ -0,0 +1 @@
+6d0c8ac42e9894ae7b5032438eb4579c2a47f4fe
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/lucene/licenses/jetty-io-9.4.11.v20180605.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/jetty-io-9.4.11.v20180605.jar.sha1 b/lucene/licenses/jetty-io-9.4.11.v20180605.jar.sha1
deleted file mode 100644
index 38f0849..0000000
--- a/lucene/licenses/jetty-io-9.4.11.v20180605.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-d164de1dac18c4ca80a1b783d879c97449909c3b
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/lucene/licenses/jetty-io-9.4.14.v20181114.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/jetty-io-9.4.14.v20181114.jar.sha1 b/lucene/licenses/jetty-io-9.4.14.v20181114.jar.sha1
new file mode 100644
index 0000000..f3acf85
--- /dev/null
+++ b/lucene/licenses/jetty-io-9.4.14.v20181114.jar.sha1
@@ -0,0 +1 @@
+a8c6a705ddb9f83a75777d89b0be59fcef3f7637
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/lucene/licenses/jetty-server-9.4.11.v20180605.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/jetty-server-9.4.11.v20180605.jar.sha1 b/lucene/licenses/jetty-server-9.4.11.v20180605.jar.sha1
deleted file mode 100644
index 36e39e0..0000000
--- a/lucene/licenses/jetty-server-9.4.11.v20180605.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-58353c2f27515b007fc83ae22002feb34fc24714
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/lucene/licenses/jetty-server-9.4.14.v20181114.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/jetty-server-9.4.14.v20181114.jar.sha1 b/lucene/licenses/jetty-server-9.4.14.v20181114.jar.sha1
new file mode 100644
index 0000000..182b5c5
--- /dev/null
+++ b/lucene/licenses/jetty-server-9.4.14.v20181114.jar.sha1
@@ -0,0 +1 @@
+b36a3d52d78a1df6406f6fa236a6eeff48cbfef6
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/lucene/licenses/jetty-servlet-9.4.11.v20180605.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/jetty-servlet-9.4.11.v20180605.jar.sha1 b/lucene/licenses/jetty-servlet-9.4.11.v20180605.jar.sha1
deleted file mode 100644
index e90c80c..0000000
--- a/lucene/licenses/jetty-servlet-9.4.11.v20180605.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-66d31900fcfc70e3666f0b3335b6660635154f98
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/lucene/licenses/jetty-servlet-9.4.14.v20181114.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/jetty-servlet-9.4.14.v20181114.jar.sha1 b/lucene/licenses/jetty-servlet-9.4.14.v20181114.jar.sha1
new file mode 100644
index 0000000..d1576d3
--- /dev/null
+++ b/lucene/licenses/jetty-servlet-9.4.14.v20181114.jar.sha1
@@ -0,0 +1 @@
+96f501462af425190ff7b63e387692c1aa3af2c8
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/lucene/licenses/jetty-util-9.4.11.v20180605.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/jetty-util-9.4.11.v20180605.jar.sha1 b/lucene/licenses/jetty-util-9.4.11.v20180605.jar.sha1
deleted file mode 100644
index 111b230..0000000
--- a/lucene/licenses/jetty-util-9.4.11.v20180605.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-f0f25aa2f27d618a04bc7356fa247ae4a05245b3
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/lucene/licenses/jetty-util-9.4.14.v20181114.jar.sha1
----------------------------------------------------------------------
diff --git a/lucene/licenses/jetty-util-9.4.14.v20181114.jar.sha1 b/lucene/licenses/jetty-util-9.4.14.v20181114.jar.sha1
new file mode 100644
index 0000000..ffced69
--- /dev/null
+++ b/lucene/licenses/jetty-util-9.4.14.v20181114.jar.sha1
@@ -0,0 +1 @@
+5bb3d7a38f7ea54138336591d89dd5867b806c02
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 6727961..1272cc9 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -26,7 +26,7 @@ Apache Tika 1.19.1
Carrot2 3.16.0
Velocity 1.7 and Velocity Tools 2.0
Apache ZooKeeper 3.4.11
-Jetty 9.4.11.v20180605
+Jetty 9.4.14.v20181114
Upgrade Notes
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java b/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java
index c1d927b..5b5a032 100644
--- a/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java
+++ b/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java
@@ -28,6 +28,7 @@ import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Random;
+import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
@@ -46,6 +47,8 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.cloud.SocketProxy;
import org.apache.solr.client.solrj.impl.HttpSolrClient;
+import org.apache.solr.common.util.ExecutorUtil;
+import org.apache.solr.common.util.SolrjNamedThreadFactory;
import org.apache.solr.common.util.TimeSource;
import org.apache.solr.core.CoreContainer;
import org.apache.solr.servlet.SolrDispatchFilter;
@@ -533,21 +536,23 @@ public class JettySolrRunner {
// we want to shutdown outside of jetty cutting us off
SolrDispatchFilter sdf = getSolrDispatchFilter();
- Thread shutdownThead = null;
+ ExecutorService customThreadPool = null;
if (sdf != null) {
- shutdownThead = new Thread() {
-
- public void run() {
- try {
- sdf.close();
- } catch (Throwable t) {
- log.error("Error shutting down Solr", t);
- }
- }
+ customThreadPool = ExecutorUtil.newMDCAwareCachedThreadPool(new SolrjNamedThreadFactory("jettyShutDown"));
- };
sdf.closeOnDestroy(false);
- shutdownThead.start();
+// customThreadPool.submit(() -> {
+// try {
+// sdf.close();
+// } catch (Throwable t) {
+// log.error("Error shutting down Solr", t);
+// }
+// });
+ try {
+ sdf.close();
+ } catch (Throwable t) {
+ log.error("Error shutting down Solr", t);
+ }
}
QueuedThreadPool qtp = (QueuedThreadPool) server.getThreadPool();
@@ -588,8 +593,8 @@ public class JettySolrRunner {
-> rte.isStopped());
}
- if (shutdownThead != null) {
- shutdownThead.join();
+ if (customThreadPool != null) {
+ ExecutorUtil.shutdownAndAwaitTermination(customThreadPool);
}
do {
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/core/src/java/org/apache/solr/cloud/ZkController.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/ZkController.java b/solr/core/src/java/org/apache/solr/cloud/ZkController.java
index d2a15b2..e1f4401 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ZkController.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ZkController.java
@@ -47,7 +47,6 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
-import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
@@ -97,6 +96,7 @@ import org.apache.solr.common.params.SolrParams;
import org.apache.solr.common.util.ExecutorUtil;
import org.apache.solr.common.util.IOUtils;
import org.apache.solr.common.util.ObjectReleaseTracker;
+import org.apache.solr.common.util.SolrjNamedThreadFactory;
import org.apache.solr.common.util.StrUtils;
import org.apache.solr.common.util.URLUtil;
import org.apache.solr.common.util.Utils;
@@ -570,7 +570,7 @@ public class ZkController implements Closeable {
public void close() {
this.isClosed = true;
- ForkJoinPool customThreadPool = new ForkJoinPool(10);
+ ExecutorService customThreadPool = ExecutorUtil.newMDCAwareCachedThreadPool(new SolrjNamedThreadFactory("closeThreadPool"));
customThreadPool.submit(() -> Collections.singleton(overseerElector.getContext()).parallelStream().forEach(c -> {
IOUtils.closeQuietly(c);
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/core/src/java/org/apache/solr/core/CoreContainer.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/core/CoreContainer.java b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
index 13d197b..706951d 100644
--- a/solr/core/src/java/org/apache/solr/core/CoreContainer.java
+++ b/solr/core/src/java/org/apache/solr/core/CoreContainer.java
@@ -50,7 +50,6 @@ import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
-import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.Future;
import org.apache.http.auth.AuthSchemeProvider;
@@ -81,6 +80,7 @@ import org.apache.solr.common.cloud.Replica.State;
import org.apache.solr.common.params.CollectionAdminParams;
import org.apache.solr.common.util.ExecutorUtil;
import org.apache.solr.common.util.IOUtils;
+import org.apache.solr.common.util.SolrjNamedThreadFactory;
import org.apache.solr.common.util.Utils;
import org.apache.solr.core.DirectoryFactory.DirContext;
import org.apache.solr.core.backup.repository.BackupRepository;
@@ -823,7 +823,7 @@ public class CoreContainer {
log.info("Shutting down CoreContainer instance="
+ System.identityHashCode(this));
- ForkJoinPool customThreadPool = new ForkJoinPool(6);
+ ExecutorService customThreadPool = ExecutorUtil.newMDCAwareCachedThreadPool(new SolrjNamedThreadFactory("closeThreadPool"));
isShutDown = true;
try {
@@ -885,9 +885,9 @@ public class CoreContainer {
solrCores.getModifyLock().notifyAll(); // wake up the thread
}
- customThreadPool.submit(() -> Collections.singleton(replayUpdatesExecutor).parallelStream().forEach(c -> {
- c.shutdownAndAwaitTermination();
- }));
+ customThreadPool.submit(() -> {
+ replayUpdatesExecutor.shutdownAndAwaitTermination();
+ });
if (metricsHistoryHandler != null) {
metricsHistoryHandler.close();
@@ -914,9 +914,9 @@ public class CoreContainer {
try {
if (coreAdminHandler != null) {
- customThreadPool.submit(() -> Collections.singleton(coreAdminHandler).parallelStream().forEach(c -> {
- c.shutdown();
- }));
+ customThreadPool.submit(() -> {
+ coreAdminHandler.shutdown();
+ });
}
} catch (Exception e) {
log.warn("Error shutting down CoreAdminHandler. Continuing to close CoreContainer.", e);
@@ -925,9 +925,9 @@ public class CoreContainer {
} finally {
try {
if (shardHandlerFactory != null) {
- customThreadPool.submit(() -> Collections.singleton(shardHandlerFactory).parallelStream().forEach(c -> {
- c.close();
- }));
+ customThreadPool.submit(() -> {
+ shardHandlerFactory.close();
+ });
}
} finally {
try {
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java b/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
index 0d9d441..708016e 100644
--- a/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/OverseerTest.java
@@ -17,15 +17,14 @@
package org.apache.solr.cloud;
import static org.apache.solr.cloud.AbstractDistribZkTestBase.verifyReplicaStatus;
+import static org.mockito.Mockito.anyBoolean;
+import static org.mockito.Mockito.anyInt;
+import static org.mockito.Mockito.anyString;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-import static org.mockito.Mockito.anyString;
-import static org.mockito.Mockito.anyInt;
-import static org.mockito.Mockito.anyBoolean;
-
import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.util.ArrayList;
@@ -38,7 +37,7 @@ import java.util.Locale;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
-import java.util.concurrent.ForkJoinPool;
+import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -48,6 +47,7 @@ import javax.xml.parsers.ParserConfigurationException;
import org.apache.lucene.util.LuceneTestCase.Slow;
import org.apache.solr.SolrTestCaseJ4;
+import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.cloud.DistributedQueue;
import org.apache.solr.client.solrj.cloud.SolrCloudManager;
import org.apache.solr.client.solrj.impl.CloudSolrClient;
@@ -68,6 +68,7 @@ import org.apache.solr.common.cloud.ZkStateReader;
import org.apache.solr.common.params.CollectionParams;
import org.apache.solr.common.util.ExecutorUtil;
import org.apache.solr.common.util.IOUtils;
+import org.apache.solr.common.util.SolrjNamedThreadFactory;
import org.apache.solr.common.util.TimeSource;
import org.apache.solr.common.util.Utils;
import org.apache.solr.core.CloudConfig;
@@ -313,27 +314,41 @@ public class OverseerTest extends SolrTestCaseJ4 {
public void tearDown() throws Exception {
testDone = true;
- ForkJoinPool customThreadPool = new ForkJoinPool(16);
+ ExecutorService customThreadPool = ExecutorUtil.newMDCAwareCachedThreadPool(new SolrjNamedThreadFactory("closeThreadPool"));
- customThreadPool.submit( () -> zkControllers.parallelStream().forEach(c -> { c.close(); }));
-
- customThreadPool.submit( () -> httpShardHandlerFactorys.parallelStream().forEach(c -> { c.close(); }));
-
- customThreadPool.submit( () -> updateShardHandlers.parallelStream().forEach(c -> { c.close(); }));
-
- customThreadPool.submit( () -> solrClients.parallelStream().forEach(c -> { IOUtils.closeQuietly(c); } ));
+ for (ZkController zkController : zkControllers) {
+ customThreadPool.submit( () -> zkController.close());
+ }
+ for (HttpShardHandlerFactory httpShardHandlerFactory : httpShardHandlerFactorys) {
+ customThreadPool.submit( () -> httpShardHandlerFactory.close());
+ }
+
+ for (UpdateShardHandler updateShardHandler : updateShardHandlers) {
+ customThreadPool.submit( () -> updateShardHandler.close());
+ }
- customThreadPool.submit( () -> readers.parallelStream().forEach(c -> { c.close();}));
+ for (SolrClient solrClient : solrClients) {
+ customThreadPool.submit( () -> IOUtils.closeQuietly(solrClient));
+ }
+
+ for (ZkStateReader reader : readers) {
+ customThreadPool.submit( () -> reader.close());
+ }
- customThreadPool.submit( () -> zkClients.parallelStream().forEach(c -> { IOUtils.closeQuietly(c); }));
+ for (SolrZkClient solrZkClient : zkClients) {
+ customThreadPool.submit( () -> IOUtils.closeQuietly(solrZkClient));
+ }
ExecutorUtil.shutdownAndAwaitTermination(customThreadPool);
- customThreadPool = new ForkJoinPool(4);
-
- customThreadPool.submit( () -> overseers.parallelStream().forEach(c -> { c.close(); }));
+ customThreadPool = ExecutorUtil.newMDCAwareCachedThreadPool(new SolrjNamedThreadFactory("closeThreadPool"));
+
+ for (Overseer overseer : overseers) {
+ customThreadPool.submit( () -> overseer.close());
+ }
+
ExecutorUtil.shutdownAndAwaitTermination(customThreadPool);
overseers.clear();
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/byte-buddy-1.6.2.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/byte-buddy-1.6.2.jar.sha1 b/solr/licenses/byte-buddy-1.6.2.jar.sha1
deleted file mode 100644
index af3a381..0000000
--- a/solr/licenses/byte-buddy-1.6.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-f58a01d36e24a94241d44d52c78e380396d5adb2
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/byte-buddy-1.9.3.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/byte-buddy-1.9.3.jar.sha1 b/solr/licenses/byte-buddy-1.9.3.jar.sha1
new file mode 100644
index 0000000..2a02d42
--- /dev/null
+++ b/solr/licenses/byte-buddy-1.9.3.jar.sha1
@@ -0,0 +1 @@
+f32e510b239620852fc9a2387fac41fd053d6a4d
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/httpclient-4.5.3.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/httpclient-4.5.3.jar.sha1 b/solr/licenses/httpclient-4.5.3.jar.sha1
deleted file mode 100644
index 415a080..0000000
--- a/solr/licenses/httpclient-4.5.3.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-d1577ae15f01ef5438c5afc62162457c00a34713
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/httpclient-4.5.6.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/httpclient-4.5.6.jar.sha1 b/solr/licenses/httpclient-4.5.6.jar.sha1
new file mode 100644
index 0000000..92b233e
--- /dev/null
+++ b/solr/licenses/httpclient-4.5.6.jar.sha1
@@ -0,0 +1 @@
+1afe5621985efe90a92d0fbc9be86271efbe796f
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/httpcore-4.4.10.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/httpcore-4.4.10.jar.sha1 b/solr/licenses/httpcore-4.4.10.jar.sha1
new file mode 100644
index 0000000..6f91546
--- /dev/null
+++ b/solr/licenses/httpcore-4.4.10.jar.sha1
@@ -0,0 +1 @@
+acc54d9b28bdffe4bbde89ed2e4a1e86b5285e2b
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/httpcore-4.4.6.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/httpcore-4.4.6.jar.sha1 b/solr/licenses/httpcore-4.4.6.jar.sha1
deleted file mode 100644
index 83cac99..0000000
--- a/solr/licenses/httpcore-4.4.6.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-e3fd8ced1f52c7574af952e2e6da0df8df08eb82
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/httpmime-4.5.3.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/httpmime-4.5.3.jar.sha1 b/solr/licenses/httpmime-4.5.3.jar.sha1
deleted file mode 100644
index 754ef54..0000000
--- a/solr/licenses/httpmime-4.5.3.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-889fd6d061bb63b99dd5c6aba35a555ae863de52
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/httpmime-4.5.6.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/httpmime-4.5.6.jar.sha1 b/solr/licenses/httpmime-4.5.6.jar.sha1
new file mode 100644
index 0000000..eba7d66
--- /dev/null
+++ b/solr/licenses/httpmime-4.5.6.jar.sha1
@@ -0,0 +1 @@
+164343da11db817e81e24e0d9869527e069850c9
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-continuation-9.4.11.v20180605.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-continuation-9.4.11.v20180605.jar.sha1 b/solr/licenses/jetty-continuation-9.4.11.v20180605.jar.sha1
deleted file mode 100644
index 443533c..0000000
--- a/solr/licenses/jetty-continuation-9.4.11.v20180605.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-31f1e347d013356317164b86bbbc2a6ce5c5e871
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-continuation-9.4.14.v20181114.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-continuation-9.4.14.v20181114.jar.sha1 b/solr/licenses/jetty-continuation-9.4.14.v20181114.jar.sha1
new file mode 100644
index 0000000..0d9db3a
--- /dev/null
+++ b/solr/licenses/jetty-continuation-9.4.14.v20181114.jar.sha1
@@ -0,0 +1 @@
+ac4981a61bcaf4e2538de6270300a870224a16b8
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-deploy-9.4.11.v20180605.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-deploy-9.4.11.v20180605.jar.sha1 b/solr/licenses/jetty-deploy-9.4.11.v20180605.jar.sha1
deleted file mode 100644
index e986062..0000000
--- a/solr/licenses/jetty-deploy-9.4.11.v20180605.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-0a65a7944d79bef225bb4431e13e6dbec4077aa5
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-deploy-9.4.14.v20181114.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-deploy-9.4.14.v20181114.jar.sha1 b/solr/licenses/jetty-deploy-9.4.14.v20181114.jar.sha1
new file mode 100644
index 0000000..bdc13e2
--- /dev/null
+++ b/solr/licenses/jetty-deploy-9.4.14.v20181114.jar.sha1
@@ -0,0 +1 @@
+db0e01f00c1d11fbf2dfa72a1707b7ac9859c943
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-http-9.4.11.v20180605.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-http-9.4.11.v20180605.jar.sha1 b/solr/licenses/jetty-http-9.4.11.v20180605.jar.sha1
deleted file mode 100644
index 76a024c..0000000
--- a/solr/licenses/jetty-http-9.4.11.v20180605.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-20c35f5336befe35b0bd5c4a63e07170fe7872d7
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-http-9.4.14.v20181114.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-http-9.4.14.v20181114.jar.sha1 b/solr/licenses/jetty-http-9.4.14.v20181114.jar.sha1
new file mode 100644
index 0000000..5e72e34
--- /dev/null
+++ b/solr/licenses/jetty-http-9.4.14.v20181114.jar.sha1
@@ -0,0 +1 @@
+6d0c8ac42e9894ae7b5032438eb4579c2a47f4fe
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-io-9.4.11.v20180605.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-io-9.4.11.v20180605.jar.sha1 b/solr/licenses/jetty-io-9.4.11.v20180605.jar.sha1
deleted file mode 100644
index 38f0849..0000000
--- a/solr/licenses/jetty-io-9.4.11.v20180605.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-d164de1dac18c4ca80a1b783d879c97449909c3b
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-io-9.4.14.v20181114.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-io-9.4.14.v20181114.jar.sha1 b/solr/licenses/jetty-io-9.4.14.v20181114.jar.sha1
new file mode 100644
index 0000000..f3acf85
--- /dev/null
+++ b/solr/licenses/jetty-io-9.4.14.v20181114.jar.sha1
@@ -0,0 +1 @@
+a8c6a705ddb9f83a75777d89b0be59fcef3f7637
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-jmx-9.4.11.v20180605.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-jmx-9.4.11.v20180605.jar.sha1 b/solr/licenses/jetty-jmx-9.4.11.v20180605.jar.sha1
deleted file mode 100644
index f2aaf1a..0000000
--- a/solr/licenses/jetty-jmx-9.4.11.v20180605.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-f942e96b0c96cc4d84349a6deee60ddfb38f7f11
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-jmx-9.4.14.v20181114.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-jmx-9.4.14.v20181114.jar.sha1 b/solr/licenses/jetty-jmx-9.4.14.v20181114.jar.sha1
new file mode 100644
index 0000000..44b8ffc
--- /dev/null
+++ b/solr/licenses/jetty-jmx-9.4.14.v20181114.jar.sha1
@@ -0,0 +1 @@
+3e02463d2bff175a3231cd3dc26363eaf76a3b17
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-rewrite-9.4.11.v20180605.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-rewrite-9.4.11.v20180605.jar.sha1 b/solr/licenses/jetty-rewrite-9.4.11.v20180605.jar.sha1
deleted file mode 100644
index 4474cea..0000000
--- a/solr/licenses/jetty-rewrite-9.4.11.v20180605.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-5d9bb01166931ef6704f0c277e02bab0c35c04d7
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-rewrite-9.4.14.v20181114.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-rewrite-9.4.14.v20181114.jar.sha1 b/solr/licenses/jetty-rewrite-9.4.14.v20181114.jar.sha1
new file mode 100644
index 0000000..636b338
--- /dev/null
+++ b/solr/licenses/jetty-rewrite-9.4.14.v20181114.jar.sha1
@@ -0,0 +1 @@
+eb300aa639175741839b25a5109772bcc71a586a
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-security-9.4.11.v20180605.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-security-9.4.11.v20180605.jar.sha1 b/solr/licenses/jetty-security-9.4.11.v20180605.jar.sha1
deleted file mode 100644
index fb1fbcf..0000000
--- a/solr/licenses/jetty-security-9.4.11.v20180605.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-926def86d31ee07ca4b4658833dc6ee6918b8e86
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-security-9.4.14.v20181114.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-security-9.4.14.v20181114.jar.sha1 b/solr/licenses/jetty-security-9.4.14.v20181114.jar.sha1
new file mode 100644
index 0000000..64e0920
--- /dev/null
+++ b/solr/licenses/jetty-security-9.4.14.v20181114.jar.sha1
@@ -0,0 +1 @@
+6cbeb2fe9b3cc4f88a7ea040b8a0c4f703cd72ce
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-server-9.4.11.v20180605.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-server-9.4.11.v20180605.jar.sha1 b/solr/licenses/jetty-server-9.4.11.v20180605.jar.sha1
deleted file mode 100644
index 36e39e0..0000000
--- a/solr/licenses/jetty-server-9.4.11.v20180605.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-58353c2f27515b007fc83ae22002feb34fc24714
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-server-9.4.14.v20181114.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-server-9.4.14.v20181114.jar.sha1 b/solr/licenses/jetty-server-9.4.14.v20181114.jar.sha1
new file mode 100644
index 0000000..182b5c5
--- /dev/null
+++ b/solr/licenses/jetty-server-9.4.14.v20181114.jar.sha1
@@ -0,0 +1 @@
+b36a3d52d78a1df6406f6fa236a6eeff48cbfef6
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-servlet-9.4.11.v20180605.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-servlet-9.4.11.v20180605.jar.sha1 b/solr/licenses/jetty-servlet-9.4.11.v20180605.jar.sha1
deleted file mode 100644
index e90c80c..0000000
--- a/solr/licenses/jetty-servlet-9.4.11.v20180605.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-66d31900fcfc70e3666f0b3335b6660635154f98
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-servlet-9.4.14.v20181114.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-servlet-9.4.14.v20181114.jar.sha1 b/solr/licenses/jetty-servlet-9.4.14.v20181114.jar.sha1
new file mode 100644
index 0000000..d1576d3
--- /dev/null
+++ b/solr/licenses/jetty-servlet-9.4.14.v20181114.jar.sha1
@@ -0,0 +1 @@
+96f501462af425190ff7b63e387692c1aa3af2c8
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-servlets-9.4.11.v20180605.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-servlets-9.4.11.v20180605.jar.sha1 b/solr/licenses/jetty-servlets-9.4.11.v20180605.jar.sha1
deleted file mode 100644
index cdcc00a..0000000
--- a/solr/licenses/jetty-servlets-9.4.11.v20180605.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-8301f94a8b8e4a8ed7c065984b18c02c4206b920
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-servlets-9.4.14.v20181114.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-servlets-9.4.14.v20181114.jar.sha1 b/solr/licenses/jetty-servlets-9.4.14.v20181114.jar.sha1
new file mode 100644
index 0000000..7fec6af
--- /dev/null
+++ b/solr/licenses/jetty-servlets-9.4.14.v20181114.jar.sha1
@@ -0,0 +1 @@
+38cfc07b53e5d285bb2fca78bb2531565ed9c9e5
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-util-9.4.11.v20180605.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-util-9.4.11.v20180605.jar.sha1 b/solr/licenses/jetty-util-9.4.11.v20180605.jar.sha1
deleted file mode 100644
index 111b230..0000000
--- a/solr/licenses/jetty-util-9.4.11.v20180605.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-f0f25aa2f27d618a04bc7356fa247ae4a05245b3
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-util-9.4.14.v20181114.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-util-9.4.14.v20181114.jar.sha1 b/solr/licenses/jetty-util-9.4.14.v20181114.jar.sha1
new file mode 100644
index 0000000..ffced69
--- /dev/null
+++ b/solr/licenses/jetty-util-9.4.14.v20181114.jar.sha1
@@ -0,0 +1 @@
+5bb3d7a38f7ea54138336591d89dd5867b806c02
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-webapp-9.4.11.v20180605.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-webapp-9.4.11.v20180605.jar.sha1 b/solr/licenses/jetty-webapp-9.4.11.v20180605.jar.sha1
deleted file mode 100644
index 9f89760..0000000
--- a/solr/licenses/jetty-webapp-9.4.11.v20180605.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-5ce28eff8338cab2a0af0e583c769567542b9558
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-webapp-9.4.14.v20181114.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-webapp-9.4.14.v20181114.jar.sha1 b/solr/licenses/jetty-webapp-9.4.14.v20181114.jar.sha1
new file mode 100644
index 0000000..1e774f3
--- /dev/null
+++ b/solr/licenses/jetty-webapp-9.4.14.v20181114.jar.sha1
@@ -0,0 +1 @@
+0088a04172b5e7736bc3e95eb58623aa9ccdb475
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-xml-9.4.11.v20180605.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-xml-9.4.11.v20180605.jar.sha1 b/solr/licenses/jetty-xml-9.4.11.v20180605.jar.sha1
deleted file mode 100644
index 25c722e..0000000
--- a/solr/licenses/jetty-xml-9.4.11.v20180605.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-883cbf629ec797bd9d8833376a0feec461628f4f
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/jetty-xml-9.4.14.v20181114.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/jetty-xml-9.4.14.v20181114.jar.sha1 b/solr/licenses/jetty-xml-9.4.14.v20181114.jar.sha1
new file mode 100644
index 0000000..ee13631
--- /dev/null
+++ b/solr/licenses/jetty-xml-9.4.14.v20181114.jar.sha1
@@ -0,0 +1 @@
+65cd197bc8082a1007130c8b644cea7938133568
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/mockito-core-2.23.4.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/mockito-core-2.23.4.jar.sha1 b/solr/licenses/mockito-core-2.23.4.jar.sha1
new file mode 100644
index 0000000..725998b
--- /dev/null
+++ b/solr/licenses/mockito-core-2.23.4.jar.sha1
@@ -0,0 +1 @@
+a35b6f8ffcfa786771eac7d7d903429e790fdf3f
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/mockito-core-2.6.2.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/mockito-core-2.6.2.jar.sha1 b/solr/licenses/mockito-core-2.6.2.jar.sha1
deleted file mode 100644
index f130b90..0000000
--- a/solr/licenses/mockito-core-2.6.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-9eeaa7c2a971cd4738e1b9391a38ba4f21f05763
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/objenesis-2.5.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/objenesis-2.5.jar.sha1 b/solr/licenses/objenesis-2.5.jar.sha1
deleted file mode 100644
index f7f506d..0000000
--- a/solr/licenses/objenesis-2.5.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-612ecb799912ccf77cba9b3ed8c813da086076e9
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/objenesis-2.6.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/objenesis-2.6.jar.sha1 b/solr/licenses/objenesis-2.6.jar.sha1
new file mode 100644
index 0000000..277e036
--- /dev/null
+++ b/solr/licenses/objenesis-2.6.jar.sha1
@@ -0,0 +1 @@
+639033469776fd37c08358c6b92a4761feb2af4b
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/licenses/start.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/start.jar.sha1 b/solr/licenses/start.jar.sha1
index 5583f36..b350925 100644
--- a/solr/licenses/start.jar.sha1
+++ b/solr/licenses/start.jar.sha1
@@ -1 +1 @@
-f7c30f1b8fba70569d65dcb353b542e5d2d220ec
+ed9434016612e1e2c29b4db88bc5fdfe7dbcec2f
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
index ff53f51..1a26451 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
@@ -836,6 +836,7 @@ public class ZkStateReader implements Closeable {
public void close() {
this.closed = true;
+
notifications.shutdownNow();
waitLatches.parallelStream().forEach(c -> { c.countDown(); });
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
----------------------------------------------------------------------
diff --git a/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java b/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
index 79a1f7a..4728aa3 100644
--- a/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
+++ b/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java
@@ -39,7 +39,6 @@ import java.util.Set;
import java.util.SortedMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
-import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
@@ -66,6 +65,7 @@ import org.apache.solr.common.params.SolrParams;
import org.apache.solr.common.util.ExecutorUtil;
import org.apache.solr.common.util.IOUtils;
import org.apache.solr.common.util.NamedList;
+import org.apache.solr.common.util.SolrjNamedThreadFactory;
import org.apache.solr.util.DefaultSolrThreadFactory;
import org.eclipse.jetty.servlet.ServletHolder;
import org.junit.AfterClass;
@@ -398,33 +398,35 @@ public abstract class BaseDistributedSearchTestCase extends SolrTestCaseJ4 {
}
protected void destroyServers() throws Exception {
- ForkJoinPool customThreadPool = new ForkJoinPool(12);
+ ExecutorService customThreadPool = ExecutorUtil.newMDCAwareCachedThreadPool(new SolrjNamedThreadFactory("closeThreadPool"));
customThreadPool.submit(() -> Collections.singleton(controlClient).parallelStream().forEach(c -> {
IOUtils.closeQuietly(c);
}));
- customThreadPool.submit(() -> Collections.singleton(controlJetty).parallelStream().forEach(c -> {
+ customThreadPool.submit(() -> {
try {
- c.stop();
+ controlJetty.stop();
} catch (NullPointerException e) {
// ignore
} catch (Exception e) {
log.error("Error stopping Control Jetty", e);
}
- }));
-
- customThreadPool.submit(() -> clients.parallelStream().forEach(c -> {
- IOUtils.closeQuietly(c);
- }));
+ });
- customThreadPool.submit(() -> jettys.parallelStream().forEach(c -> {
- try {
- c.stop();
- } catch (Exception e) {
- log.error("Error stopping Jetty", e);
- }
- }));
+ for (SolrClient client : clients) {
+ customThreadPool.submit(() -> IOUtils.closeQuietly(client));
+ }
+
+ for (JettySolrRunner jetty : jettys) {
+ customThreadPool.submit(() -> {
+ try {
+ jetty.stop();
+ } catch (Exception e) {
+ log.error("Error stopping Jetty", e);
+ }
+ });
+ }
ExecutorUtil.shutdownAndAwaitTermination(customThreadPool);
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a47b6400/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
----------------------------------------------------------------------
diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
index 2fdb4b1..7df3345 100644
--- a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
+++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
@@ -37,7 +37,7 @@ import java.util.Properties;
import java.util.Random;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ForkJoinPool;
+import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicInteger;
@@ -82,6 +82,7 @@ import org.apache.solr.common.params.SolrParams;
import org.apache.solr.common.util.ExecutorUtil;
import org.apache.solr.common.util.IOUtils;
import org.apache.solr.common.util.NamedList;
+import org.apache.solr.common.util.SolrjNamedThreadFactory;
import org.apache.solr.common.util.StrUtils;
import org.apache.solr.common.util.TimeSource;
import org.apache.solr.common.util.Utils;
@@ -406,7 +407,7 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
cloudClient.waitForState(DEFAULT_COLLECTION, 30, TimeUnit.SECONDS, (l,c) -> c != null && c.getSlices().size() == sliceCount);
- ForkJoinPool customThreadPool = new ForkJoinPool(12);
+ ExecutorService customThreadPool = ExecutorUtil.newMDCAwareCachedThreadPool(new SolrjNamedThreadFactory("closeThreadPool"));
int numOtherReplicas = numJettys - getPullReplicaCount() * sliceCount;
@@ -426,7 +427,7 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
numOtherReplicas--;
if (useTlogReplicas()) {
log.info("create jetty {} in directory {} of type {} in shard {}", i, jettyDir, Replica.Type.TLOG, ((currentI % sliceCount) + 1));
- customThreadPool.submit(() -> Collections.singleton(controlClient).parallelStream().forEach(c -> {
+ customThreadPool.submit(() -> {
try {
JettySolrRunner j = createJetty(jettyDir, useJettyDataDir ? getDataDir(testDir + "/jetty"
+ cnt) : null, null, "solrconfig.xml", null, Replica.Type.TLOG);
@@ -444,17 +445,19 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
clients.add(client);
} catch (IOException e) {
+ e.printStackTrace();
throw new RuntimeException(e);
} catch (Exception e) {
+ e.printStackTrace();
throw new RuntimeException(e);
}
- }));
+ });
addedReplicas++;
} else {
log.info("create jetty {} in directory {} of type {}", i, jettyDir, Replica.Type.NRT, ((currentI % sliceCount) + 1));
- customThreadPool.submit(() -> Collections.singleton(controlClient).parallelStream().forEach(c -> {
+ customThreadPool.submit(() -> {
try {
JettySolrRunner j = createJetty(jettyDir, useJettyDataDir ? getDataDir(testDir + "/jetty"
+ cnt) : null, null, "solrconfig.xml", null, null);
@@ -469,17 +472,19 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
SolrClient client = createNewSolrClient(j.getLocalPort());
clients.add(client);
} catch (IOException e) {
+ e.printStackTrace();
throw new RuntimeException(e);
} catch (Exception e) {
+ e.printStackTrace();
throw new RuntimeException(e);
}
- }));
+ });
addedReplicas++;
}
} else {
log.info("create jetty {} in directory {} of type {}", i, jettyDir, Replica.Type.PULL, ((currentI % sliceCount) + 1));
- customThreadPool.submit(() -> Collections.singleton(controlClient).parallelStream().forEach(c -> {
+ customThreadPool.submit(() -> {
try {
JettySolrRunner j = createJetty(jettyDir, useJettyDataDir ? getDataDir(testDir + "/jetty"
+ cnt) : null, null, "solrconfig.xml", null, Replica.Type.PULL);
@@ -494,11 +499,13 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
SolrClient client = createNewSolrClient(j.getLocalPort());
clients.add(client);
} catch (IOException e) {
+ e.printStackTrace();
throw new RuntimeException(e);
} catch (Exception e) {
+ e.printStackTrace();
throw new RuntimeException(e);
}
- }));
+ });
addedReplicas++;
}
@@ -506,33 +513,39 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
ExecutorUtil.shutdownAndAwaitTermination(customThreadPool);
- customThreadPool = new ForkJoinPool(12);
- customThreadPool.submit(() -> createReplicaRequests.parallelStream().forEach(r -> {
- CollectionAdminResponse response;
- try {
- response = (CollectionAdminResponse) r.process(cloudClient);
- } catch (SolrServerException | IOException e) {
- throw new RuntimeException(e);
- }
+ customThreadPool = ExecutorUtil.newMDCAwareCachedThreadPool(new SolrjNamedThreadFactory("createReplicaRequests"));
+
+ for (CollectionAdminRequest r : createReplicaRequests) {
+ customThreadPool.submit(() -> {
+ CollectionAdminResponse response;
+ try {
+ response = (CollectionAdminResponse) r.process(cloudClient);
+ } catch (SolrServerException | IOException e) {
+ throw new RuntimeException(e);
+ }
- assertTrue(response.isSuccess());
- String coreName = response.getCollectionCoresStatus().keySet().iterator().next();
- }));
+ assertTrue(response.isSuccess());
+ String coreName = response.getCollectionCoresStatus().keySet().iterator().next();
+ });
+ }
ExecutorUtil.shutdownAndAwaitTermination(customThreadPool);
- customThreadPool = new ForkJoinPool(12);
- customThreadPool.submit(() -> createPullReplicaRequests.parallelStream().forEach(r -> {
- CollectionAdminResponse response;
- try {
- response = (CollectionAdminResponse) r.process(cloudClient);
- } catch (SolrServerException | IOException e) {
- throw new RuntimeException(e);
- }
+ customThreadPool = ExecutorUtil
+ .newMDCAwareCachedThreadPool(new SolrjNamedThreadFactory("createPullReplicaRequests"));
+ for (CollectionAdminRequest r : createPullReplicaRequests) {
+ customThreadPool.submit(() -> {
+ CollectionAdminResponse response;
+ try {
+ response = (CollectionAdminResponse) r.process(cloudClient);
+ } catch (SolrServerException | IOException e) {
+ throw new RuntimeException(e);
+ }
- assertTrue(response.isSuccess());
- String coreName = response.getCollectionCoresStatus().keySet().iterator().next();
- }));
+ assertTrue(response.isSuccess());
+ String coreName = response.getCollectionCoresStatus().keySet().iterator().next();
+ });
+ }
ExecutorUtil.shutdownAndAwaitTermination(customThreadPool);
@@ -1654,7 +1667,7 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
@Override
protected void destroyServers() throws Exception {
- ForkJoinPool customThreadPool = new ForkJoinPool(6);
+ ExecutorService customThreadPool = ExecutorUtil.newMDCAwareCachedThreadPool(new SolrjNamedThreadFactory("closeThreadPool"));
customThreadPool.submit(() -> Collections.singleton(commonCloudSolrClient).parallelStream().forEach(c -> {
IOUtils.closeQuietly(c);
[2/4] lucene-solr:branch_7x: SOLR-12801: Wait for executor to finish
shutdown.
Posted by ma...@apache.org.
SOLR-12801: Wait for executor to finish shutdown.
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/79d7efe8
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/79d7efe8
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/79d7efe8
Branch: refs/heads/branch_7x
Commit: 79d7efe811a4e9e672d1a55e8b30683a927c1f4d
Parents: a47b640
Author: markrmiller <ma...@gmail.com>
Authored: Fri Nov 30 23:58:28 2018 -0600
Committer: markrmiller <ma...@apache.org>
Committed: Sat Dec 1 00:34:28 2018 -0600
----------------------------------------------------------------------
.../TimeRoutedAliasUpdateProcessor.java | 21 ++++++++++++++------
.../TimeRoutedAliasUpdateProcessorTest.java | 10 +++++-----
2 files changed, 20 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79d7efe8/solr/core/src/java/org/apache/solr/update/processor/TimeRoutedAliasUpdateProcessor.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/update/processor/TimeRoutedAliasUpdateProcessor.java b/solr/core/src/java/org/apache/solr/update/processor/TimeRoutedAliasUpdateProcessor.java
index cc1ddb8..872404f 100644
--- a/solr/core/src/java/org/apache/solr/update/processor/TimeRoutedAliasUpdateProcessor.java
+++ b/solr/core/src/java/org/apache/solr/update/processor/TimeRoutedAliasUpdateProcessor.java
@@ -41,6 +41,7 @@ import org.apache.solr.common.cloud.ZkCoreNodeProps;
import org.apache.solr.common.params.ModifiableSolrParams;
import org.apache.solr.common.params.SolrParams;
import org.apache.solr.common.params.UpdateParams;
+import org.apache.solr.common.util.ExecutorUtil;
import org.apache.solr.core.CoreContainer;
import org.apache.solr.core.SolrCore;
import org.apache.solr.handler.admin.CollectionsHandler;
@@ -96,9 +97,9 @@ public class TimeRoutedAliasUpdateProcessor extends UpdateRequestProcessor {
// never be updated by any async creation thread.
private List<Map.Entry<Instant, String>> parsedCollectionsDesc; // k=timestamp (start), v=collection. Sorted descending
private Aliases parsedCollectionsAliases; // a cached reference to the source of what we parse into parsedCollectionsDesc
+ private volatile boolean executorRunning = false;
- // This will be updated out in async creation threads see preemptiveAsync(Runnable r) for details
- private volatile ExecutorService preemptiveCreationExecutor;
+ private ExecutorService preemptiveCreationWaitExecutor = newMDCAwareSingleThreadExecutor(new DefaultSolrThreadFactory("TRA-preemptive-creation-wait"));
public static UpdateRequestProcessor wrap(SolrQueryRequest req, UpdateRequestProcessor next) {
//TODO get from "Collection property"
@@ -215,7 +216,7 @@ public class TimeRoutedAliasUpdateProcessor extends UpdateRequestProcessor {
// This next line blocks until all collections required by the current document have been created
return createAllRequiredCollections(docTimestamp, cmd.getPrintableId(), candidateCollectionDesc);
case ASYNC_PREEMPTIVE:
- if (preemptiveCreationExecutor == null) {
+ if (!executorRunning) {
// It's important not to add code between here and the prior call to findCandidateGivenTimestamp()
// in processAdd() that invokes updateParsedCollectionAliases(). Doing so would update parsedCollectionsDesc
// and create a race condition. We are relying on the fact that get(0) is returning the head of the parsed
@@ -247,13 +248,17 @@ public class TimeRoutedAliasUpdateProcessor extends UpdateRequestProcessor {
// would need to be shut down in a close hook to avoid test failures due to thread leaks in tests which is slightly
// more complicated from a code maintenance and readability stand point. An executor must used instead of a
// thread to ensure we pick up the proper MDC logging stuff from ExecutorUtil.
+ executorRunning = true;
DefaultSolrThreadFactory threadFactory = new DefaultSolrThreadFactory("TRA-preemptive-creation");
- preemptiveCreationExecutor = newMDCAwareSingleThreadExecutor(threadFactory);
+ ExecutorService preemptiveCreationExecutor = newMDCAwareSingleThreadExecutor(threadFactory);
+
preemptiveCreationExecutor.execute(() -> {
r.run();
preemptiveCreationExecutor.shutdown();
- preemptiveCreationExecutor = null;
+ executorRunning = false;
});
+
+ preemptiveCreationWaitExecutor.submit(() -> ExecutorUtil.awaitTermination(preemptiveCreationExecutor));
}
/**
@@ -413,7 +418,11 @@ public class TimeRoutedAliasUpdateProcessor extends UpdateRequestProcessor {
try {
cmdDistrib.close();
} finally {
- super.doClose();
+ try {
+ super.doClose();
+ } finally {
+ ExecutorUtil.shutdownAndAwaitTermination(preemptiveCreationWaitExecutor);
+ }
}
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79d7efe8/solr/core/src/test/org/apache/solr/update/processor/TimeRoutedAliasUpdateProcessorTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/update/processor/TimeRoutedAliasUpdateProcessorTest.java b/solr/core/src/test/org/apache/solr/update/processor/TimeRoutedAliasUpdateProcessorTest.java
index fa2d2d7..4423030 100644
--- a/solr/core/src/test/org/apache/solr/update/processor/TimeRoutedAliasUpdateProcessorTest.java
+++ b/solr/core/src/test/org/apache/solr/update/processor/TimeRoutedAliasUpdateProcessorTest.java
@@ -375,7 +375,7 @@ public class TimeRoutedAliasUpdateProcessorTest extends SolrCloudTestCase {
assertUpdateResponse(solrClient.commit(alias));
cols = new CollectionAdminRequest.ListAliases().process(solrClient).getAliasesAsLists().get(alias);
- assertEquals(3,cols.size());
+ assertEquals(4, cols.size());
assertNumDocs("2017-10-23", 1);
assertNumDocs("2017-10-24", 1);
assertNumDocs("2017-10-25", 3);
@@ -387,7 +387,7 @@ public class TimeRoutedAliasUpdateProcessorTest extends SolrCloudTestCase {
waitCol("2017-10-26", numShards);
cols = new CollectionAdminRequest.ListAliases().process(solrClient).getAliasesAsLists().get(alias);
- assertEquals(4,cols.size());
+ assertEquals(5, cols.size());
assertNumDocs("2017-10-23", 1);
assertNumDocs("2017-10-24", 1);
assertNumDocs("2017-10-25", 4);
@@ -404,7 +404,7 @@ public class TimeRoutedAliasUpdateProcessorTest extends SolrCloudTestCase {
waitCol("2017-10-27", numShards);
cols = new CollectionAdminRequest.ListAliases().process(solrClient).getAliasesAsLists().get(alias);
- assertEquals(5,cols.size()); // only one created in async case
+ assertEquals(6,cols.size()); // only one created in async case
assertNumDocs("2017-10-23", 1);
assertNumDocs("2017-10-24", 1);
assertNumDocs("2017-10-25", 5);
@@ -419,7 +419,7 @@ public class TimeRoutedAliasUpdateProcessorTest extends SolrCloudTestCase {
waitCol("2017-10-28", numShards);
cols = new CollectionAdminRequest.ListAliases().process(solrClient).getAliasesAsLists().get(alias);
- assertEquals(6,cols.size()); // Subsequent documents continue to create up to limit
+ assertEquals(7,cols.size()); // Subsequent documents continue to create up to limit
assertNumDocs("2017-10-23", 1);
assertNumDocs("2017-10-24", 1);
assertNumDocs("2017-10-25", 6);
@@ -451,7 +451,7 @@ public class TimeRoutedAliasUpdateProcessorTest extends SolrCloudTestCase {
waitCol("2017-10-29", numShards);
cols = new CollectionAdminRequest.ListAliases().process(solrClient).getAliasesAsLists().get(alias);
- assertEquals(7,cols.size());
+ assertEquals(8,cols.size());
assertNumDocs("2017-10-23", 1);
assertNumDocs("2017-10-24", 1);
assertNumDocs("2017-10-25", 6);
[4/4] lucene-solr:branch_7x: SOLR-13027: Change retries to work
across JVM impls properly by looking for an IOException.
Posted by ma...@apache.org.
SOLR-13027: Change retries to work across JVM impls properly by looking for an IOException.
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/2968669c
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/2968669c
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/2968669c
Branch: refs/heads/branch_7x
Commit: 2968669c5362e12d4c946fd6b624ad9c60731720
Parents: 0e6b29c
Author: markrmiller <ma...@apache.org>
Authored: Sat Dec 1 00:26:15 2018 -0600
Committer: markrmiller <ma...@apache.org>
Committed: Sat Dec 1 00:34:46 2018 -0600
----------------------------------------------------------------------
.../solrj/impl/SolrClientNodeStateProvider.java | 26 +++++++++++---------
1 file changed, 14 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2968669c/solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrClientNodeStateProvider.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrClientNodeStateProvider.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrClientNodeStateProvider.java
index e057c3e..531c631 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrClientNodeStateProvider.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrClientNodeStateProvider.java
@@ -19,7 +19,6 @@ package org.apache.solr.client.solrj.impl;
import java.io.IOException;
import java.lang.invoke.MethodHandles;
-import java.net.SocketException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -32,7 +31,6 @@ import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
-import org.apache.http.NoHttpResponseException;
import org.apache.solr.client.solrj.SolrRequest;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.cloud.NodeStateProvider;
@@ -201,17 +199,17 @@ public class SolrClientNodeStateProvider implements NodeStateProvider, MapWriter
while (cnt++ < 3) {
try {
rsp = ctx.invoke(solrNode, CommonParams.METRICS_PATH, params);
- } catch (SolrException | SolrServerException | NoHttpResponseException e) {
- boolean hasCauseNoHttpResponseException = false;
+ } catch (SolrException | SolrServerException | IOException e) {
+ boolean hasCauseIOException = false;
Throwable cause = e;
while (cause != null) {
- if (cause instanceof NoHttpResponseException) {
- hasCauseNoHttpResponseException = true;
+ if (cause instanceof IOException) {
+ hasCauseIOException = true;
break;
}
cause = cause.getCause();
}
- if (hasCauseNoHttpResponseException || e instanceof NoHttpResponseException) {
+ if (hasCauseIOException || e instanceof IOException) {
log.info("Error on getting remote info, trying again: " + e.getMessage());
Thread.sleep(500);
continue;
@@ -307,17 +305,21 @@ public class SolrClientNodeStateProvider implements NodeStateProvider, MapWriter
while (cnt++ < retries) {
try {
rsp = snitchContext.invoke(solrNode, CommonParams.METRICS_PATH, params);
- } catch (SolrException | SolrServerException | SocketException e) {
- boolean hasCauseSocketException = false;
+ } catch (SolrException | SolrServerException | IOException e) {
+ if (e instanceof SolrServerException) {
+
+ }
+
+ boolean hasCauseIOException = false;
Throwable cause = e;
while (cause != null) {
- if (cause instanceof SocketException) {
- hasCauseSocketException = true;
+ if (cause instanceof IOException) {
+ hasCauseIOException = true;
break;
}
cause = cause.getCause();
}
- if (hasCauseSocketException || e instanceof SocketException) {
+ if (hasCauseIOException || e instanceof IOException) {
log.info("Error on getting remote info, trying again: " + e.getMessage());
Thread.sleep(500);
continue;
[3/4] lucene-solr:branch_7x: SOLR-12801: Wait for collections
properly.
Posted by ma...@apache.org.
SOLR-12801: Wait for collections properly.
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/0e6b29c3
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/0e6b29c3
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/0e6b29c3
Branch: refs/heads/branch_7x
Commit: 0e6b29c3e19fd86d7fa4cef805c1e797935cc46a
Parents: 79d7efe
Author: markrmiller <ma...@gmail.com>
Authored: Sat Dec 1 00:10:09 2018 -0600
Committer: markrmiller <ma...@apache.org>
Committed: Sat Dec 1 00:34:38 2018 -0600
----------------------------------------------------------------------
.../apache/solr/handler/admin/AutoscalingHistoryHandlerTest.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0e6b29c3/solr/core/src/test/org/apache/solr/handler/admin/AutoscalingHistoryHandlerTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/AutoscalingHistoryHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/admin/AutoscalingHistoryHandlerTest.java
index 8163db8..d86bee2 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/AutoscalingHistoryHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/AutoscalingHistoryHandlerTest.java
@@ -86,6 +86,7 @@ public class AutoscalingHistoryHandlerTest extends SolrCloudTestCase {
CollectionAdminRequest.createCollection(CollectionAdminParams.SYSTEM_COLL, null, 1, 1)
.setCreateNodeSet(systemCollNode)
.process(solrClient);
+ cluster.waitForActiveCollection(CollectionAdminParams.SYSTEM_COLL, 1, 1);
Set<String> otherNodes = cluster.getJettySolrRunners().stream().map(JettySolrRunner::getNodeName)
.collect(Collectors.toSet());
otherNodes.remove(systemCollNode);
@@ -93,8 +94,7 @@ public class AutoscalingHistoryHandlerTest extends SolrCloudTestCase {
.setCreateNodeSet(String.join(",", otherNodes))
.setMaxShardsPerNode(3)
.process(solrClient);
- waitForRecovery(CollectionAdminParams.SYSTEM_COLL);
- waitForRecovery(COLL_NAME);
+ cluster.waitForActiveCollection(COLL_NAME, 1, 3);
}
public static class TesterListener extends TriggerListenerBase {