You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2022/04/22 17:23:04 UTC
[pulsar] branch master updated: [fix][jdk17] Enable Netty and BookKeeper IO optimizations on jdk17 (#15256)
This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 2d12011dbc0 [fix][jdk17] Enable Netty and BookKeeper IO optimizations on jdk17 (#15256)
2d12011dbc0 is described below
commit 2d12011dbc01173bce1e9e8eed8d92a355baa08b
Author: Nicolò Boschi <bo...@gmail.com>
AuthorDate: Fri Apr 22 19:22:53 2022 +0200
[fix][jdk17] Enable Netty and BookKeeper IO optimizations on jdk17 (#15256)
---
bin/bookkeeper | 7 ++++---
bin/function-localrunner | 3 ++-
bin/pulsar | 7 ++++---
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/bin/bookkeeper b/bin/bookkeeper
index b2f2638ab1b..1142a68e96f 100755
--- a/bin/bookkeeper
+++ b/bin/bookkeeper
@@ -170,11 +170,12 @@ IS_JAVA_8=`java -version 2>&1 |grep version|grep '"1\.8'`
# Start --add-opens options
# '--add-opens' option is not supported in jdk8
if [[ -z "$IS_JAVA_8" ]]; then
- # BookKeeper: enable posix_fadvise usage
- OPTS="$OPTS --add-opens java.base/java.io=ALL-UNNAMED"
+ # BookKeeper: enable posix_fadvise usage and DirectMemoryCRC32Digest (https://github.com/apache/bookkeeper/pull/3234)
+ OPTS="$OPTS --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util.zip=ALL-UNNAMED"
# Netty: enable java.nio.DirectByteBuffer
# https://github.com/netty/netty/blob/4.1/common/src/main/java/io/netty/util/internal/PlatformDependent0.java
- OPTS="$OPTS --add-opens java.base/java.nio=ALL-UNNAMED"
+ # https://github.com/netty/netty/issues/12265
+ OPTS="$OPTS --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/jdk.internal.misc=ALL-UNNAMED"
fi
OPTS="-cp $BOOKIE_CLASSPATH $OPTS"
diff --git a/bin/function-localrunner b/bin/function-localrunner
index d01cd5cae9c..c9e9892e51e 100755
--- a/bin/function-localrunner
+++ b/bin/function-localrunner
@@ -94,7 +94,8 @@ OPTS="$OPTS -Dio.netty.tryReflectionSetAccessible=true"
if [[ -z "$IS_JAVA_8" ]]; then
# Netty: enable java.nio.DirectByteBuffer
# https://github.com/netty/netty/blob/4.1/common/src/main/java/io/netty/util/internal/PlatformDependent0.java
- OPTS="$OPTS --add-opens java.base/java.nio=ALL-UNNAMED"
+ # https://github.com/netty/netty/issues/12265
+ OPTS="$OPTS --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/jdk.internal.misc=ALL-UNNAMED"
fi
# Ensure we can read bigger content from ZK. (It might be
diff --git a/bin/pulsar b/bin/pulsar
index df8d8014412..7c1133549a6 100755
--- a/bin/pulsar
+++ b/bin/pulsar
@@ -277,11 +277,12 @@ IS_JAVA_8=`java -version 2>&1 |grep version|grep '"1\.8'`
# Start --add-opens options
# '--add-opens' option is not supported in jdk8
if [[ -z "$IS_JAVA_8" ]]; then
- # BookKeeper: enable posix_fadvise usage
- OPTS="$OPTS --add-opens java.base/java.io=ALL-UNNAMED"
+ # BookKeeper: enable posix_fadvise usage and DirectMemoryCRC32Digest (https://github.com/apache/bookkeeper/pull/3234)
+ OPTS="$OPTS --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util.zip=ALL-UNNAMED"
# Netty: enable java.nio.DirectByteBuffer
# https://github.com/netty/netty/blob/4.1/common/src/main/java/io/netty/util/internal/PlatformDependent0.java
- OPTS="$OPTS --add-opens java.base/java.nio=ALL-UNNAMED"
+ # https://github.com/netty/netty/issues/12265
+ OPTS="$OPTS --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/jdk.internal.misc=ALL-UNNAMED"
fi
OPTS="-cp $PULSAR_CLASSPATH $OPTS"