You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by md...@apache.org on 2021/05/18 15:17:43 UTC

[solr] branch main updated: SOLR-15409: Upgrade to Zookeeper 3.7.0 (#130)

This is an automated email from the ASF dual-hosted git repository.

mdrob pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/main by this push:
     new 6d3e512  SOLR-15409: Upgrade to Zookeeper 3.7.0 (#130)
6d3e512 is described below

commit 6d3e512a2817da41952c05ef3d8545b5ac10a91c
Author: Mike Drob <md...@apache.org>
AuthorDate: Tue May 18 10:17:35 2021 -0500

    SOLR-15409: Upgrade to Zookeeper 3.7.0 (#130)
---
 solr/CHANGES.txt                                   |  2 ++
 solr/licenses/commons-lang-2.6.jar.sha1            |  1 -
 solr/licenses/netty-buffer-4.1.50.Final.jar.sha1   |  1 -
 solr/licenses/netty-buffer-4.1.59.Final.jar.sha1   |  1 +
 solr/licenses/netty-codec-4.1.50.Final.jar.sha1    |  1 -
 solr/licenses/netty-codec-4.1.59.Final.jar.sha1    |  1 +
 solr/licenses/netty-common-4.1.50.Final.jar.sha1   |  1 -
 solr/licenses/netty-common-4.1.59.Final.jar.sha1   |  1 +
 solr/licenses/netty-handler-4.1.50.Final.jar.sha1  |  1 -
 solr/licenses/netty-handler-4.1.59.Final.jar.sha1  |  1 +
 solr/licenses/netty-resolver-4.1.50.Final.jar.sha1 |  1 -
 solr/licenses/netty-resolver-4.1.59.Final.jar.sha1 |  1 +
 .../licenses/netty-transport-4.1.50.Final.jar.sha1 |  1 -
 .../licenses/netty-transport-4.1.59.Final.jar.sha1 |  1 +
 ...ty-transport-native-epoll-4.1.50.Final.jar.sha1 |  1 -
 ...ty-transport-native-epoll-4.1.59.Final.jar.sha1 |  1 +
 ...nsport-native-unix-common-4.1.50.Final.jar.sha1 |  1 -
 ...nsport-native-unix-common-4.1.59.Final.jar.sha1 |  1 +
 solr/licenses/zookeeper-3.6.2.jar.sha1             |  1 -
 solr/licenses/zookeeper-3.7.0.jar.sha1             |  1 +
 solr/licenses/zookeeper-jute-3.6.2.jar.sha1        |  1 -
 solr/licenses/zookeeper-jute-3.7.0.jar.sha1        |  1 +
 .../src/major-changes-in-solr-9.adoc               |  2 ++
 .../solr/client/solrj/io/stream/DrillStream.java   |  4 ++--
 .../java/org/apache/solr/common/SolrException.java |  3 ++-
 .../solr/common/cloud/ZkMaintenanceUtils.java      | 15 +++++++++-----
 versions.lock                                      | 23 +++++++++++-----------
 versions.props                                     |  2 +-
 28 files changed, 40 insertions(+), 32 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 2a540bd..9278291 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -293,6 +293,8 @@ Other Changes
 
 * SOLR-15222: userfiles dir will only be created in SolrCloud mode (Mike Drob)
 
+* SOLR-15409: Upgrade to Zookeeper 3.7.0 (Mike Drob)
+
 Bug Fixes
 ---------------------
 * SOLR-14546: Fix for a relatively hard to hit issue in OverseerTaskProcessor that could lead to out of order execution
diff --git a/solr/licenses/commons-lang-2.6.jar.sha1 b/solr/licenses/commons-lang-2.6.jar.sha1
deleted file mode 100644
index 4d7b0bf..0000000
--- a/solr/licenses/commons-lang-2.6.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-0ce1edb914c94ebc388f086c6827e8bdeec71ac2
diff --git a/solr/licenses/netty-buffer-4.1.50.Final.jar.sha1 b/solr/licenses/netty-buffer-4.1.50.Final.jar.sha1
deleted file mode 100644
index 8e8923e..0000000
--- a/solr/licenses/netty-buffer-4.1.50.Final.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-42b556977c572a376172a3270537ee22203c1a35
diff --git a/solr/licenses/netty-buffer-4.1.59.Final.jar.sha1 b/solr/licenses/netty-buffer-4.1.59.Final.jar.sha1
new file mode 100644
index 0000000..272f1f9
--- /dev/null
+++ b/solr/licenses/netty-buffer-4.1.59.Final.jar.sha1
@@ -0,0 +1 @@
+a1f281008d7e9574c14d386b39b3639a240eb0d1
diff --git a/solr/licenses/netty-codec-4.1.50.Final.jar.sha1 b/solr/licenses/netty-codec-4.1.50.Final.jar.sha1
deleted file mode 100644
index 7911031..0000000
--- a/solr/licenses/netty-codec-4.1.50.Final.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-cbcb646c9380c6cdc3f56603ae6418a11418ce0f
diff --git a/solr/licenses/netty-codec-4.1.59.Final.jar.sha1 b/solr/licenses/netty-codec-4.1.59.Final.jar.sha1
new file mode 100644
index 0000000..e2721d7
--- /dev/null
+++ b/solr/licenses/netty-codec-4.1.59.Final.jar.sha1
@@ -0,0 +1 @@
+5e563309b99cf55bdbecc4dab7c417a0167c31aa
diff --git a/solr/licenses/netty-common-4.1.50.Final.jar.sha1 b/solr/licenses/netty-common-4.1.50.Final.jar.sha1
deleted file mode 100644
index 3f9682d..0000000
--- a/solr/licenses/netty-common-4.1.50.Final.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-d2059030b86733c52fd999e63db7300414b487fa
diff --git a/solr/licenses/netty-common-4.1.59.Final.jar.sha1 b/solr/licenses/netty-common-4.1.59.Final.jar.sha1
new file mode 100644
index 0000000..05b0509
--- /dev/null
+++ b/solr/licenses/netty-common-4.1.59.Final.jar.sha1
@@ -0,0 +1 @@
+e8800b0c50b6743ec1c5a3713816ce58910a703a
diff --git a/solr/licenses/netty-handler-4.1.50.Final.jar.sha1 b/solr/licenses/netty-handler-4.1.50.Final.jar.sha1
deleted file mode 100644
index 8e80024..0000000
--- a/solr/licenses/netty-handler-4.1.50.Final.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-dc0110fc4d22fb22f1038cd73a6f8a034928a2d7
diff --git a/solr/licenses/netty-handler-4.1.59.Final.jar.sha1 b/solr/licenses/netty-handler-4.1.59.Final.jar.sha1
new file mode 100644
index 0000000..7369bef
--- /dev/null
+++ b/solr/licenses/netty-handler-4.1.59.Final.jar.sha1
@@ -0,0 +1 @@
+302b4c8ca800aeddcf94401f2403114c8f5db5a5
diff --git a/solr/licenses/netty-resolver-4.1.50.Final.jar.sha1 b/solr/licenses/netty-resolver-4.1.50.Final.jar.sha1
deleted file mode 100644
index 114714b..0000000
--- a/solr/licenses/netty-resolver-4.1.50.Final.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-deb87b3c901142d73279a58e16867cf6f2b1c2e5
diff --git a/solr/licenses/netty-resolver-4.1.59.Final.jar.sha1 b/solr/licenses/netty-resolver-4.1.59.Final.jar.sha1
new file mode 100644
index 0000000..6a537ef
--- /dev/null
+++ b/solr/licenses/netty-resolver-4.1.59.Final.jar.sha1
@@ -0,0 +1 @@
+26bc136952a9f7a994dd7162f481c860275948de
diff --git a/solr/licenses/netty-transport-4.1.50.Final.jar.sha1 b/solr/licenses/netty-transport-4.1.50.Final.jar.sha1
deleted file mode 100644
index aab40be..0000000
--- a/solr/licenses/netty-transport-4.1.50.Final.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-2e4f6b655933faca0deef8d234ac6725b598109a
diff --git a/solr/licenses/netty-transport-4.1.59.Final.jar.sha1 b/solr/licenses/netty-transport-4.1.59.Final.jar.sha1
new file mode 100644
index 0000000..c8099d0
--- /dev/null
+++ b/solr/licenses/netty-transport-4.1.59.Final.jar.sha1
@@ -0,0 +1 @@
+864d20f35ce909e6a7462095cb8f91ee94d1cd4c
diff --git a/solr/licenses/netty-transport-native-epoll-4.1.50.Final.jar.sha1 b/solr/licenses/netty-transport-native-epoll-4.1.50.Final.jar.sha1
deleted file mode 100644
index 2d84180..0000000
--- a/solr/licenses/netty-transport-native-epoll-4.1.50.Final.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-480ab17c1ebfb32fcd493577d3e3241dc56e62f4
diff --git a/solr/licenses/netty-transport-native-epoll-4.1.59.Final.jar.sha1 b/solr/licenses/netty-transport-native-epoll-4.1.59.Final.jar.sha1
new file mode 100644
index 0000000..45ea4ea
--- /dev/null
+++ b/solr/licenses/netty-transport-native-epoll-4.1.59.Final.jar.sha1
@@ -0,0 +1 @@
+0d80613566ff6aa65580325d4a8ec6126b6cd47a
diff --git a/solr/licenses/netty-transport-native-unix-common-4.1.50.Final.jar.sha1 b/solr/licenses/netty-transport-native-unix-common-4.1.50.Final.jar.sha1
deleted file mode 100644
index 63b68ff..0000000
--- a/solr/licenses/netty-transport-native-unix-common-4.1.50.Final.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-87b98225422fccf2bf113e169c45e683de200a3e
diff --git a/solr/licenses/netty-transport-native-unix-common-4.1.59.Final.jar.sha1 b/solr/licenses/netty-transport-native-unix-common-4.1.59.Final.jar.sha1
new file mode 100644
index 0000000..ccc1b74
--- /dev/null
+++ b/solr/licenses/netty-transport-native-unix-common-4.1.59.Final.jar.sha1
@@ -0,0 +1 @@
+f5d4ad1f995ec40c20220ad9ec75b14172ac9320
diff --git a/solr/licenses/zookeeper-3.6.2.jar.sha1 b/solr/licenses/zookeeper-3.6.2.jar.sha1
deleted file mode 100644
index c2ebcda..0000000
--- a/solr/licenses/zookeeper-3.6.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-bd0630f2de482ce8a14bc1de8dc12ef6197f4624
diff --git a/solr/licenses/zookeeper-3.7.0.jar.sha1 b/solr/licenses/zookeeper-3.7.0.jar.sha1
new file mode 100644
index 0000000..eaac8f2
--- /dev/null
+++ b/solr/licenses/zookeeper-3.7.0.jar.sha1
@@ -0,0 +1 @@
+1360048c7ca057df627b7267ff7360870e987ab0
diff --git a/solr/licenses/zookeeper-jute-3.6.2.jar.sha1 b/solr/licenses/zookeeper-jute-3.6.2.jar.sha1
deleted file mode 100644
index 05a9ea4..0000000
--- a/solr/licenses/zookeeper-jute-3.6.2.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-1cb72bc20e0796c2bb10034e514f76364e902898
diff --git a/solr/licenses/zookeeper-jute-3.7.0.jar.sha1 b/solr/licenses/zookeeper-jute-3.7.0.jar.sha1
new file mode 100644
index 0000000..3a71369
--- /dev/null
+++ b/solr/licenses/zookeeper-jute-3.7.0.jar.sha1
@@ -0,0 +1 @@
+502176b97601e187a77936378ec52f554d386d0f
diff --git a/solr/solr-ref-guide/src/major-changes-in-solr-9.adoc b/solr/solr-ref-guide/src/major-changes-in-solr-9.adoc
index 68692be..a22e957 100644
--- a/solr/solr-ref-guide/src/major-changes-in-solr-9.adoc
+++ b/solr/solr-ref-guide/src/major-changes-in-solr-9.adoc
@@ -154,6 +154,8 @@ _(raw; not yet edited)_
 
 * SOLR-15276: V2 API call to look up async request status restful style of "/cluster/command-status/1000" instead of "/cluster/command-status?requestid=1000".
 
+* SOLR-15409: Zookeeper client libraries upgraded to 3.7.0, which may not be compatible with your existing server installations
+
 === Upgrade Prerequisites in Solr 9
 
 * Upgrade all collections in stateFormat=1 to stateFormat=2 *before* upgrading to Solr 9, as Solr 9 does not support the
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/DrillStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/DrillStream.java
index 91e307e..f4f1ada 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/DrillStream.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/DrillStream.java
@@ -21,7 +21,6 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Locale;
 
-import org.apache.commons.lang.exception.ExceptionUtils;
 import org.apache.solr.client.solrj.io.Tuple;
 import org.apache.solr.client.solrj.io.comp.FieldComparator;
 import org.apache.solr.client.solrj.io.comp.StreamComparator;
@@ -33,6 +32,7 @@ import org.apache.solr.client.solrj.io.stream.expr.StreamExpression;
 import org.apache.solr.client.solrj.io.stream.expr.StreamExpressionNamedParameter;
 import org.apache.solr.client.solrj.io.stream.expr.StreamExpressionValue;
 import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
+import org.apache.solr.common.SolrException;
 import org.apache.solr.common.params.ModifiableSolrParams;
 
 import static org.apache.solr.common.params.CommonParams.DISTRIB;
@@ -268,7 +268,7 @@ public class DrillStream extends CloudSolrStream implements Expressible {
         solrStreams.add(solrStream);
       });
     } catch (Exception e) {
-      Throwable rootCause = ExceptionUtils.getRootCause(e);
+      Throwable rootCause = SolrException.getRootCause(e);
       if (rootCause instanceof IOException) {
         throw (IOException)rootCause;
       } else {
diff --git a/solr/solrj/src/java/org/apache/solr/common/SolrException.java b/solr/solrj/src/java/org/apache/solr/common/SolrException.java
index 2375710..b86d485 100644
--- a/solr/solrj/src/java/org/apache/solr/common/SolrException.java
+++ b/solr/solrj/src/java/org/apache/solr/common/SolrException.java
@@ -212,7 +212,8 @@ public class SolrException extends RuntimeException {
 
     return null;
   }
-  
+
+  // TODO: This doesn't handle cause loops
     public static Throwable getRootCause(Throwable t) {
     while (true) {
       Throwable cause = t.getCause();
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkMaintenanceUtils.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkMaintenanceUtils.java
index 5d874a6..645b80d 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkMaintenanceUtils.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkMaintenanceUtils.java
@@ -33,8 +33,8 @@ import java.util.Locale;
 import java.util.function.Predicate;
 import java.util.regex.Pattern;
 
-import org.apache.commons.lang.StringUtils;
 import org.apache.solr.client.solrj.SolrServerException;
+import org.apache.solr.common.StringUtils;
 import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.data.Stat;
 import org.slf4j.Logger;
@@ -418,14 +418,19 @@ public class ZkMaintenanceUtils {
   // Will return empty string if the path is just "/"
   // Will return empty string if the path is just ""
   public static String getZkParent(String path) {
+    if (StringUtils.isEmpty(path) || "/".equals(path)) {
+      return "";
+    }
     // Remove trailing slash if present.
-    if (StringUtils.endsWith(path, "/")) {
-      path = StringUtils.substringBeforeLast(path, "/");
+    int endIndex = path.length() - 1;
+    if (path.endsWith("/")) {
+      endIndex--;
     }
-    if (StringUtils.contains(path, "/") == false) {
+    int index = path.lastIndexOf("/", endIndex);
+    if (index == -1) {
       return "";
     }
-    return (StringUtils.substringBeforeLast(path, "/"));
+    return path.substring(0, index);
   }
 
   // Take into account Windows file separators when making a Znode's name.
diff --git a/versions.lock b/versions.lock
index 43f6842..b0919f8 100644
--- a/versions.lock
+++ b/versions.lock
@@ -58,7 +58,6 @@ commons-cli:commons-cli:1.4 (1 constraints: a9041e2c)
 commons-codec:commons-codec:1.13 (3 constraints: 88269b79)
 commons-collections:commons-collections:3.2.2 (1 constraints: 09050236)
 commons-io:commons-io:2.8.0 (1 constraints: 0c050d36)
-commons-lang:commons-lang:2.6 (1 constraints: 2a0d520d)
 commons-logging:commons-logging:1.1.3 (2 constraints: c8149e7f)
 de.l3s.boilerpipe:boilerpipe:1.1.0 (1 constraints: 0405f335)
 io.dropwizard.metrics:metrics-core:4.1.5 (5 constraints: 2543e4c0)
@@ -69,14 +68,14 @@ io.dropwizard.metrics:metrics-jvm:4.1.5 (1 constraints: 0c050736)
 io.grpc:grpc-context:1.36.0 (3 constraints: 5a22231e)
 io.jaegertracing:jaeger-core:1.1.0 (1 constraints: 5c0d6c26)
 io.jaegertracing:jaeger-thrift:1.1.0 (1 constraints: 0405f335)
-io.netty:netty-buffer:4.1.50.Final (6 constraints: 0555463a)
-io.netty:netty-codec:4.1.50.Final (2 constraints: f0132581)
-io.netty:netty-common:4.1.50.Final (8 constraints: 6d6ed7af)
-io.netty:netty-handler:4.1.50.Final (2 constraints: 25171741)
-io.netty:netty-resolver:4.1.50.Final (3 constraints: 9b2100cd)
-io.netty:netty-transport:4.1.50.Final (5 constraints: 5a47c31d)
-io.netty:netty-transport-native-epoll:4.1.50.Final (2 constraints: 25171741)
-io.netty:netty-transport-native-unix-common:4.1.50.Final (2 constraints: fc194204)
+io.netty:netty-buffer:4.1.59.Final (6 constraints: 32558a4d)
+io.netty:netty-codec:4.1.59.Final (2 constraints: f9136481)
+io.netty:netty-common:4.1.59.Final (8 constraints: ac6e00d5)
+io.netty:netty-handler:4.1.59.Final (2 constraints: 2e175641)
+io.netty:netty-resolver:4.1.59.Final (3 constraints: ad21e6ce)
+io.netty:netty-transport:4.1.59.Final (5 constraints: 7e47082a)
+io.netty:netty-transport-native-epoll:4.1.59.Final (2 constraints: 2e175641)
+io.netty:netty-transport-native-unix-common:4.1.59.Final (2 constraints: 051a8104)
 io.opencensus:opencensus-api:0.28.0 (5 constraints: 21426a37)
 io.opencensus:opencensus-contrib-http-util:0.28.0 (3 constraints: f7265f07)
 io.opentracing:opentracing-api:0.33.0 (5 constraints: 4d3cfe52)
@@ -171,8 +170,8 @@ org.apache.tika:tika-java7:1.24 (1 constraints: db04f730)
 org.apache.tika:tika-parsers:1.24 (1 constraints: db04f730)
 org.apache.tika:tika-xmp:1.24 (1 constraints: db04f730)
 org.apache.xmlbeans:xmlbeans:3.1.0 (1 constraints: 0605fd35)
-org.apache.zookeeper:zookeeper:3.6.2 (1 constraints: 0d050e36)
-org.apache.zookeeper:zookeeper-jute:3.6.2 (1 constraints: 8b0d3928)
+org.apache.zookeeper:zookeeper:3.7.0 (1 constraints: 0c050f36)
+org.apache.zookeeper:zookeeper-jute:3.7.0 (1 constraints: 8a0d3a28)
 org.aspectj:aspectjrt:1.8.0 (1 constraints: 0b050836)
 org.bitbucket.b_c:jose4j:0.6.5 (1 constraints: 0d050236)
 org.bouncycastle:bcmail-jdk15on:1.64 (1 constraints: df04ff30)
@@ -223,7 +222,7 @@ org.ow2.asm:asm:7.2 (2 constraints: 4e19d5db)
 org.ow2.asm:asm-commons:7.2 (1 constraints: 6b0f7267)
 org.rrd4j:rrd4j:3.5 (1 constraints: ac04252c)
 org.slf4j:jcl-over-slf4j:1.7.24 (1 constraints: 4005473b)
-org.slf4j:slf4j-api:1.7.24 (14 constraints: ccafc13c)
+org.slf4j:slf4j-api:1.7.24 (14 constraints: c8af2e3b)
 org.tallison:jmatio:1.5 (1 constraints: aa041f2c)
 org.threeten:threetenbp:1.5.0 (4 constraints: f82b9e86)
 org.tukaani:xz:1.8 (1 constraints: ad04222c)
diff --git a/versions.props b/versions.props
index 7837c24..199f6b2 100644
--- a/versions.props
+++ b/versions.props
@@ -93,7 +93,7 @@ org.apache.pdfbox:jempbox=1.8.16
 org.apache.poi:*=4.1.1
 org.apache.tika:*=1.24
 org.apache.xmlbeans:xmlbeans=3.1.0
-org.apache.zookeeper:*=3.6.2
+org.apache.zookeeper:*=3.7.0
 org.asciidoctor:asciidoctorj=1.6.2
 org.aspectj:aspectjrt=1.8.0
 org.bitbucket.b_c:jose4j=0.6.5