Skip to content

Commit

Permalink
Upgrade to Netty 4.1.111.Final and switch to use grpc-netty-shaded (a…
Browse files Browse the repository at this point in the history
…pache#4426)

### Motivation

[Netty 4.1.111.Final](https://netty.io/news/2024/06/11/4-1-111-Final.html) contains important fixes:
- netty/netty#14086
- netty/netty#14093

On the Pulsar side these address Broker stability when TLS with Bookkeeper V2 protocol is used between Broker and Bookies. The Bookkeeper client didn't contain a workaround for the Netty SslHandler "feature" like Pulsar did. That's why Bookkeeper client was impacted. Netty 4.1.111.Final will address those stability issues with the Bookkeeper client when using V2 protocol over TLS.

### Changes

- Upgrade Netty to 4.1.111.Final
- Switch to use grpc-netty-shaded instead of grpc-netty
  - grpc-java is not compatible with Netty 4.1.111.Final. [grpc-java supports only specific Netty versions](https://github.com/grpc/grpc-java/blob/master/SECURITY.md#netty). The solution is to use grpc-netty-shaded instead of grpc-netty dependency.
- Add module to shade jetcd-core partially so that it can work with grpc-netty-shaded. 
  - jetcd-core library and it's transient dependency vertx-grpc has a direct dependency on grpc-netty and it doesn't work with grpc-netty-shaded without this solution.
  - this solution avoids the need to shade grpc libraries completely which would cause a lot of duplication and increase build times.
  • Loading branch information
lhotari authored and Anup Ghatage committed Jul 12, 2024
1 parent 7a8297b commit 67c870f
Show file tree
Hide file tree
Showing 14 changed files with 449 additions and 257 deletions.
92 changes: 46 additions & 46 deletions bookkeeper-dist/src/main/resources/LICENSE-all.bin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -217,32 +217,32 @@ Apache Software License, Version 2.
- lib/commons-io-commons-io-2.7.jar [8]
- lib/commons-lang-commons-lang-2.6.jar [9]
- lib/commons-logging-commons-logging-1.1.1.jar [10]
- lib/io.netty-netty-buffer-4.1.108.Final.jar [11]
- lib/io.netty-netty-codec-4.1.108.Final.jar [11]
- lib/io.netty-netty-codec-dns-4.1.108.Final.jar [11]
- lib/io.netty-netty-codec-http-4.1.108.Final.jar [11]
- lib/io.netty-netty-codec-http2-4.1.108.Final.jar [11]
- lib/io.netty-netty-codec-socks-4.1.108.Final.jar [11]
- lib/io.netty-netty-common-4.1.108.Final.jar [11]
- lib/io.netty-netty-handler-4.1.108.Final.jar [11]
- lib/io.netty-netty-handler-proxy-4.1.108.Final.jar [11]
- lib/io.netty-netty-resolver-4.1.108.Final.jar [11]
- lib/io.netty-netty-resolver-dns-4.1.108.Final.jar [11]
- lib/io.netty-netty-buffer-4.1.111.Final.jar [11]
- lib/io.netty-netty-codec-4.1.111.Final.jar [11]
- lib/io.netty-netty-codec-dns-4.1.111.Final.jar [11]
- lib/io.netty-netty-codec-http-4.1.111.Final.jar [11]
- lib/io.netty-netty-codec-http2-4.1.111.Final.jar [11]
- lib/io.netty-netty-codec-socks-4.1.111.Final.jar [11]
- lib/io.netty-netty-common-4.1.111.Final.jar [11]
- lib/io.netty-netty-handler-4.1.111.Final.jar [11]
- lib/io.netty-netty-handler-proxy-4.1.111.Final.jar [11]
- lib/io.netty-netty-resolver-4.1.111.Final.jar [11]
- lib/io.netty-netty-resolver-dns-4.1.111.Final.jar [11]
- lib/io.netty-netty-tcnative-boringssl-static-2.0.65.Final.jar [11]
- lib/io.netty-netty-tcnative-boringssl-static-2.0.65.Final-linux-aarch_64.jar [11]
- lib/io.netty-netty-tcnative-boringssl-static-2.0.65.Final-linux-x86_64.jar [11]
- lib/io.netty-netty-tcnative-boringssl-static-2.0.65.Final-osx-aarch_64.jar [11]
- lib/io.netty-netty-tcnative-boringssl-static-2.0.65.Final-osx-x86_64.jar [11]
- lib/io.netty-netty-tcnative-boringssl-static-2.0.65.Final-windows-x86_64.jar [11]
- lib/io.netty-netty-tcnative-classes-2.0.65.Final.jar [11]
- lib/io.netty-netty-transport-4.1.108.Final.jar [11]
- lib/io.netty-netty-transport-classes-epoll-4.1.108.Final.jar [11]
- lib/io.netty-netty-transport-native-epoll-4.1.108.Final-linux-aarch_64.jar [11]
- lib/io.netty-netty-transport-native-epoll-4.1.108.Final-linux-x86_64.jar [11]
- lib/io.netty-netty-transport-4.1.111.Final.jar [11]
- lib/io.netty-netty-transport-classes-epoll-4.1.111.Final.jar [11]
- lib/io.netty-netty-transport-native-epoll-4.1.111.Final-linux-aarch_64.jar [11]
- lib/io.netty-netty-transport-native-epoll-4.1.111.Final-linux-x86_64.jar [11]
- lib/io.netty.incubator-netty-incubator-transport-native-io_uring-0.0.25.Final-linux-x86_64.jar [11]
- lib/io.netty.incubator-netty-incubator-transport-native-io_uring-0.0.25.Final-linux-aarch_64.jar [11]
- lib/io.netty.incubator-netty-incubator-transport-classes-io_uring-0.0.25.Final.jar [11]
- lib/io.netty-netty-transport-native-unix-common-4.1.108.Final.jar [11]
- lib/io.netty-netty-transport-native-unix-common-4.1.111.Final.jar [11]
- lib/io.prometheus-simpleclient-0.15.0.jar [12]
- lib/io.prometheus-simpleclient_common-0.15.0.jar [12]
- lib/io.prometheus-simpleclient_hotspot-0.15.0.jar [12]
Expand Down Expand Up @@ -290,7 +290,7 @@ Apache Software License, Version 2.
- lib/io.grpc-grpc-grpclb-1.64.0.jar [33]
- lib/io.grpc-grpc-inprocess-1.64.0.jar [33]
- lib/io.grpc-grpc-opentelemetry-1.64.0.jar [33]
- lib/io.grpc-grpc-netty-1.64.0.jar [33]
- lib/io.grpc-grpc-netty-shaded-1.64.0.jar [33]
- lib/io.grpc-grpc-protobuf-1.64.0.jar [33]
- lib/io.grpc-grpc-protobuf-lite-1.64.0.jar [33]
- lib/io.grpc-grpc-services-1.64.0.jar [33]
Expand Down Expand Up @@ -364,7 +364,7 @@ Apache Software License, Version 2.
[8] Source available at https://github.com/apache/commons-io/tree/rel/commons-io-2.7
[9] Source available at https://github.com/apache/commons-lang/tree/LANG_2_6
[10] Source available at https://github.com/apache/commons-logging/tree/commons-logging-1.1.1
[11] Source available at https://github.com/netty/netty/tree/netty-4.1.108.Final
[11] Source available at https://github.com/netty/netty/tree/netty-4.1.111.Final
[12] Source available at https://github.com/prometheus/client_java/tree/parent-0.15.0
[13] Source available at https://github.com/vert-x3/vertx-auth/tree/4.3.2
[14] Source available at https://github.com/vert-x3/vertx-bridge-common/tree/4.3.2
Expand Down Expand Up @@ -408,9 +408,9 @@ Apache Software License, Version 2.
[57] Source available at https://github.com/LMAX-Exchange/disruptor/releases/tag/4.0.0

------------------------------------------------------------------------------------
lib/io.netty-netty-codec-4.1.108.Final.jar bundles some 3rd party dependencies
lib/io.netty-netty-codec-4.1.111.Final.jar bundles some 3rd party dependencies

lib/io.netty-netty-codec-4.1.108.Final.jar contains the extensions to Java Collections Framework which has
lib/io.netty-netty-codec-4.1.111.Final.jar contains the extensions to Java Collections Framework which has
been derived from the works by JSR-166 EG, Doug Lea, and Jason T. Greene:

* LICENSE:
Expand All @@ -419,31 +419,31 @@ been derived from the works by JSR-166 EG, Doug Lea, and Jason T. Greene:
* http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/
* http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbosscache/experimental/jsr166/

lib/io.netty-netty-codec-4.1.108.Final.jar contains a modified version of Robert Harder's Public Domain
lib/io.netty-netty-codec-4.1.111.Final.jar contains a modified version of Robert Harder's Public Domain
Base64 Encoder and Decoder, which can be obtained at:

* LICENSE:
* deps/netty/LICENSE.base64.txt (Public Domain)
* HOMEPAGE:
* http://iharder.sourceforge.net/current/java/base64/

lib/io.netty-netty-codec-4.1.108.Final.jar contains a modified portion of 'Webbit', an event based
lib/io.netty-netty-codec-4.1.111.Final.jar contains a modified portion of 'Webbit', an event based
WebSocket and HTTP server, which can be obtained at:

* LICENSE:
* deps/netty/LICENSE.webbit.txt (BSD License)
* HOMEPAGE:
* https://github.com/joewalnes/webbit

lib/io.netty-netty-codec-4.1.108.Final.jar contains a modified portion of 'SLF4J', a simple logging
lib/io.netty-netty-codec-4.1.111.Final.jar contains a modified portion of 'SLF4J', a simple logging
facade for Java, which can be obtained at:

* LICENSE:
* deps/netty/LICENSE.slf4j.txt (MIT License)
* HOMEPAGE:
* http://www.slf4j.org/

lib/io.netty-netty-codec-4.1.108.Final.jar contains a modified portion of 'Apache Harmony', an open source
lib/io.netty-netty-codec-4.1.111.Final.jar contains a modified portion of 'Apache Harmony', an open source
Java SE, which can be obtained at:

* NOTICE:
Expand All @@ -453,15 +453,15 @@ Java SE, which can be obtained at:
* HOMEPAGE:
* http://archive.apache.org/dist/harmony/

lib/io.netty-netty-codec-4.1.108.Final.jar contains a modified portion of 'jbzip2', a Java bzip2 compression
lib/io.netty-netty-codec-4.1.111.Final.jar contains a modified portion of 'jbzip2', a Java bzip2 compression
and decompression library written by Matthew J. Francis. It can be obtained at:

* LICENSE:
* deps/netty/LICENSE.jbzip2.txt (MIT License)
* HOMEPAGE:
* https://code.google.com/p/jbzip2/

lib/io.netty-netty-codec-4.1.108.Final.jar contains a modified portion of 'libdivsufsort', a C API library to construct
lib/io.netty-netty-codec-4.1.111.Final.jar contains a modified portion of 'libdivsufsort', a C API library to construct
the suffix array and the Burrows-Wheeler transformed string for any input string of
a constant-size alphabet written by Yuta Mori. It can be obtained at:

Expand All @@ -470,63 +470,63 @@ a constant-size alphabet written by Yuta Mori. It can be obtained at:
* HOMEPAGE:
* https://github.com/y-256/libdivsufsort

lib/io.netty-netty-codec-4.1.108.Final.jar contains a modified portion of Nitsan Wakart's 'JCTools',
lib/io.netty-netty-codec-4.1.111.Final.jar contains a modified portion of Nitsan Wakart's 'JCTools',
Java Concurrency Tools for the JVM, which can be obtained at:

* LICENSE:
* deps/netty/LICENSE.jctools.txt (ASL2 License)
* HOMEPAGE:
* https://github.com/JCTools/JCTools

lib/io.netty-netty-codec-4.1.108.Final.jar optionally depends on 'JZlib', a re-implementation of zlib in
lib/io.netty-netty-codec-4.1.111.Final.jar optionally depends on 'JZlib', a re-implementation of zlib in
pure Java, which can be obtained at:

* LICENSE:
* deps/netty/LICENSE.jzlib.txt (BSD style License)
* HOMEPAGE:
* http://www.jcraft.com/jzlib/

lib/io.netty-netty-codec-4.1.108.Final.jar optionally depends on 'Compress-LZF', a Java library for encoding and
lib/io.netty-netty-codec-4.1.111.Final.jar optionally depends on 'Compress-LZF', a Java library for encoding and
decoding data in LZF format, written by Tatu Saloranta. It can be obtained at:

* LICENSE:
* deps/netty/LICENSE.compress-lzf.txt (Apache License 2.0)
* HOMEPAGE:
* https://github.com/ning/compress

lib/io.netty-netty-codec-4.1.108.Final.jar optionally depends on 'lz4', a LZ4 Java compression
lib/io.netty-netty-codec-4.1.111.Final.jar optionally depends on 'lz4', a LZ4 Java compression
and decompression library written by Adrien Grand. It can be obtained at:

* LICENSE:
* deps/netty/LICENSE.lz4.txt (Apache License 2.0)
* HOMEPAGE:
* https://github.com/jpountz/lz4-java

lib/io.netty-netty-codec-4.1.108.Final.jar optionally depends on 'lzma-java', a LZMA Java compression
lib/io.netty-netty-codec-4.1.111.Final.jar optionally depends on 'lzma-java', a LZMA Java compression
and decompression library, which can be obtained at:

* LICENSE:
* deps/netty/LICENSE.lzma-java.txt (Apache License 2.0)
* HOMEPAGE:
* https://github.com/jponge/lzma-java

lib/io.netty-netty-codec-4.1.108.Final.jar contains a modified portion of 'jfastlz', a Java port of FastLZ compression
lib/io.netty-netty-codec-4.1.111.Final.jar contains a modified portion of 'jfastlz', a Java port of FastLZ compression
and decompression library written by William Kinney. It can be obtained at:

* LICENSE:
* deps/netty/LICENSE.jfastlz.txt (MIT License)
* HOMEPAGE:
* https://code.google.com/p/jfastlz/

lib/io.netty-netty-codec-4.1.108.Final.jar contains a modified portion of and optionally depends on 'Protocol Buffers',
lib/io.netty-netty-codec-4.1.111.Final.jar contains a modified portion of and optionally depends on 'Protocol Buffers',
Google's data interchange format, which can be obtained at:

* LICENSE:
* deps/netty/LICENSE.protobuf.txt (New BSD License)
* HOMEPAGE:
* https://github.com/google/protobuf

lib/io.netty-netty-codec-4.1.108.Final.jar optionally depends on 'Bouncy Castle Crypto APIs' to generate
lib/io.netty-netty-codec-4.1.111.Final.jar optionally depends on 'Bouncy Castle Crypto APIs' to generate
a temporary self-signed X.509 certificate when the JVM does not provide the
equivalent functionality. It can be obtained at:

Expand All @@ -535,79 +535,79 @@ equivalent functionality. It can be obtained at:
* HOMEPAGE:
* http://www.bouncycastle.org/

lib/io.netty-netty-codec-4.1.108.Final.jar optionally depends on 'Snappy', a compression library produced
lib/io.netty-netty-codec-4.1.111.Final.jar optionally depends on 'Snappy', a compression library produced
by Google Inc, which can be obtained at:

* LICENSE:
* deps/netty/LICENSE.snappy.txt (New BSD License)
* HOMEPAGE:
* https://github.com/google/snappy

lib/io.netty-netty-codec-4.1.108.Final.jar optionally depends on 'JBoss Marshalling', an alternative Java
lib/io.netty-netty-codec-4.1.111.Final.jar optionally depends on 'JBoss Marshalling', an alternative Java
serialization API, which can be obtained at:

* LICENSE:
* deps/netty/LICENSE.jboss-marshalling.txt (Apache License 2.0)
* HOMEPAGE:
* https://github.com/jboss-remoting/jboss-marshalling

lib/io.netty-netty-codec-4.1.108.Final.jar optionally depends on 'Caliper', Google's micro-
lib/io.netty-netty-codec-4.1.111.Final.jar optionally depends on 'Caliper', Google's micro-
benchmarking framework, which can be obtained at:

* LICENSE:
* deps/netty/LICENSE.caliper.txt (Apache License 2.0)
* HOMEPAGE:
* https://github.com/google/caliper

lib/io.netty-netty-codec-4.1.108.Final.jar optionally depends on 'Apache Commons Logging', a logging
lib/io.netty-netty-codec-4.1.111.Final.jar optionally depends on 'Apache Commons Logging', a logging
framework, which can be obtained at:

* LICENSE:
* deps/netty/LICENSE.commons-logging.txt (Apache License 2.0)
* HOMEPAGE:
* http://commons.apache.org/logging/

lib/io.netty-netty-codec-4.1.108.Final.jar optionally depends on 'Apache Log4J', a logging framework, which
lib/io.netty-netty-codec-4.1.111.Final.jar optionally depends on 'Apache Log4J', a logging framework, which
can be obtained at:

* LICENSE:
* deps/netty/LICENSE.log4j.txt (Apache License 2.0)
* HOMEPAGE:
* http://logging.apache.org/log4j/

lib/io.netty-netty-codec-4.1.108.Final.jar optionally depends on 'Aalto XML', an ultra-high performance
lib/io.netty-netty-codec-4.1.111.Final.jar optionally depends on 'Aalto XML', an ultra-high performance
non-blocking XML processor, which can be obtained at:

* LICENSE:
* deps/netty/LICENSE.aalto-xml.txt (Apache License 2.0)
* HOMEPAGE:
* http://wiki.fasterxml.com/AaltoHome

lib/io.netty-netty-codec-4.1.108.Final.jar contains a modified version of 'HPACK', a Java implementation of
lib/io.netty-netty-codec-4.1.111.Final.jar contains a modified version of 'HPACK', a Java implementation of
the HTTP/2 HPACK algorithm written by Twitter. It can be obtained at:

* LICENSE:
* deps/netty/LICENSE.hpack.txt (Apache License 2.0)
* HOMEPAGE:
* https://github.com/twitter/hpack

lib/io.netty-netty-codec-4.1.108.Final.jar contains a modified version of 'HPACK', a Java implementation of
lib/io.netty-netty-codec-4.1.111.Final.jar contains a modified version of 'HPACK', a Java implementation of
the HTTP/2 HPACK algorithm written by Cory Benfield. It can be obtained at:

* LICENSE:
* deps/netty/LICENSE.hyper-hpack.txt (MIT License)
* HOMEPAGE:
* https://github.com/python-hyper/hpack/

lib/io.netty-netty-codec-4.1.108.Final.jar contains a modified version of 'HPACK', a Java implementation of
lib/io.netty-netty-codec-4.1.111.Final.jar contains a modified version of 'HPACK', a Java implementation of
the HTTP/2 HPACK algorithm written by Tatsuhiro Tsujikawa. It can be obtained at:

* LICENSE:
* deps/netty/LICENSE.nghttp2-hpack.txt (MIT License)
* HOMEPAGE:
* https://github.com/nghttp2/nghttp2/

lib/io.netty-netty-codec-4.1.108.Final.jar contains a modified portion of 'Apache Commons Lang', a Java library
lib/io.netty-netty-codec-4.1.111.Final.jar contains a modified portion of 'Apache Commons Lang', a Java library
provides utilities for the java.lang API, which can be obtained at:

* LICENSE:
Expand All @@ -616,15 +616,15 @@ provides utilities for the java.lang API, which can be obtained at:
* https://commons.apache.org/proper/commons-lang/


lib/io.netty-netty-codec-4.1.108.Final.jar contains the Maven wrapper scripts from 'Maven Wrapper',
lib/io.netty-netty-codec-4.1.111.Final.jar contains the Maven wrapper scripts from 'Maven Wrapper',
that provides an easy way to ensure a user has everything necessary to run the Maven build.

* LICENSE:
* deps/netty/LICENSE.mvn-wrapper.txt (Apache License 2.0)
* HOMEPAGE:
* https://github.com/takari/maven-wrapper

lib/io.netty-netty-codec-4.1.108.Final.jar contains the dnsinfo.h header file,
lib/io.netty-netty-codec-4.1.111.Final.jar contains the dnsinfo.h header file,
that provides a way to retrieve the system DNS configuration on MacOS.
This private header is also used by Apple's open source
mDNSResponder (https://opensource.apple.com/tarballs/mDNSResponder/).
Expand Down
Loading

0 comments on commit 67c870f

Please sign in to comment.