Skip to content
Permalink
Browse files
[netty] remove no longer used properties io.netty.recycler.linkCapaci…
…ty and io.netty.recycler.maxCapacity.default (#3172)

* [netty] remove no longer used properties io.netty.recycler.linkCapacity and io.netty.recycler.maxCapacity.default

* gradle
  • Loading branch information
nicoloboschi committed Apr 3, 2022
1 parent 5502b40 commit daf52648f210c65d96326a8b9a4f66a72551deef
Showing 6 changed files with 6 additions and 18 deletions.
@@ -82,8 +82,6 @@ detect_jdk8() {

# default netty settings
NETTY_LEAK_DETECTION_LEVEL=${NETTY_LEAK_DETECTION_LEVEL:-"disabled"}
NETTY_RECYCLER_MAXCAPACITY=${NETTY_RECYCLER_MAXCAPACITY:-"1000"}
NETTY_RECYCLER_LINKCAPACITY=${NETTY_RECYCLER_LINKCAPACITY:-"1024"}

USING_JDK8=$(detect_jdk8)

@@ -286,9 +284,7 @@ build_cli_jvm_opts() {
}

build_netty_opts() {
echo "-Dio.netty.leakDetectionLevel=${NETTY_LEAK_DETECTION_LEVEL} \
-Dio.netty.recycler.maxCapacity.default=${NETTY_RECYCLER_MAXCAPACITY} \
-Dio.netty.recycler.linkCapacity=${NETTY_RECYCLER_LINKCAPACITY}"
echo "-Dio.netty.leakDetectionLevel=${NETTY_LEAK_DETECTION_LEVEL}"
}

build_logging_opts() {
@@ -82,8 +82,6 @@ detect_jdk8() {

# default netty settings
NETTY_LEAK_DETECTION_LEVEL=${NETTY_LEAK_DETECTION_LEVEL:-"disabled"}
NETTY_RECYCLER_MAXCAPACITY=${NETTY_RECYCLER_MAXCAPACITY:-"1000"}
NETTY_RECYCLER_LINKCAPACITY=${NETTY_RECYCLER_LINKCAPACITY:-"1024"}

USING_JDK8=$(detect_jdk8)

@@ -268,9 +266,7 @@ build_cli_jvm_opts() {
}

build_netty_opts() {
echo "-Dio.netty.leakDetectionLevel=${NETTY_LEAK_DETECTION_LEVEL} \
-Dio.netty.recycler.maxCapacity.default=${NETTY_RECYCLER_MAXCAPACITY} \
-Dio.netty.recycler.linkCapacity=${NETTY_RECYCLER_LINKCAPACITY}"
echo "-Dio.netty.leakDetectionLevel=${NETTY_LEAK_DETECTION_LEVEL}"
}

build_logging_opts() {
@@ -48,7 +48,7 @@ SS_MEM=" -Xms2g -Xmx2g -XX:MaxDirectMemorySize=4g"
SS_GC=" -XX:+UseG1GC -XX:MaxGCPauseMillis=10 -XX:+ParallelRefProcEnabled -XX:+UnlockExperimentalVMOptions -XX:+AggressiveOpts -XX:+DoEscapeAnalysis -XX:ParallelGCThreads=32 -XX:ConcGCThreads=32 -XX:G1NewSizePercent=50 -XX:+DisableExplicitGC -XX:-ResizePLAB"

# Extra options to be passed to the jvm
SS_EXTRA_OPTS="${SS_EXTRA_OPTS} ${SS_MEM} ${SS_GC} -Dio.netty.leakDetectionLevel=disabled -Dio.netty.recycler.maxCapacity.default=1000 -Dio.netty.recycler.linkCapacity=1024"
SS_EXTRA_OPTS="${SS_EXTRA_OPTS} ${SS_MEM} ${SS_GC} -Dio.netty.leakDetectionLevel=disabled"

# Add extra paths to the bookkeeper classpath
# SS_EXTRA_CLASSPATH=
@@ -48,7 +48,7 @@ SS_MEM=" -Xms2g -Xmx2g -XX:MaxDirectMemorySize=4g"
SS_GC=" -XX:+UseG1GC -XX:MaxGCPauseMillis=10 -XX:+ParallelRefProcEnabled -XX:+UnlockExperimentalVMOptions -XX:+AggressiveOpts -XX:+DoEscapeAnalysis -XX:ParallelGCThreads=32 -XX:ConcGCThreads=32 -XX:G1NewSizePercent=50 -XX:+DisableExplicitGC -XX:-ResizePLAB"

# Extra options to be passed to the jvm
SS_EXTRA_OPTS="${SS_EXTRA_OPTS} ${SS_MEM} ${SS_GC} -Dio.netty.leakDetectionLevel=disabled -Dio.netty.recycler.maxCapacity.default=1000 -Dio.netty.recycler.linkCapacity=1024"
SS_EXTRA_OPTS="${SS_EXTRA_OPTS} ${SS_MEM} ${SS_GC} -Dio.netty.leakDetectionLevel=disabled"

# Add extra paths to the bookkeeper classpath
# SS_EXTRA_CLASSPATH=
@@ -228,9 +228,7 @@ testBuildNettyOpts() {
source ${BK_BINDIR}/common.sh

ACTUAL_NETTY_OPTS=$(build_netty_opts)
EXPECTED_NETTY_OPTS="-Dio.netty.leakDetectionLevel=disabled \
-Dio.netty.recycler.maxCapacity.default=1000 \
-Dio.netty.recycler.linkCapacity=1024"
EXPECTED_NETTY_OPTS="-Dio.netty.leakDetectionLevel=disabled"

assertEquals "Netty OPTS is not set correctly" "${EXPECTED_NETTY_OPTS}" "${ACTUAL_NETTY_OPTS}"
}
@@ -205,9 +205,7 @@ testBuildNettyOpts() {
source ${BK_BINDIR}/common_gradle.sh

ACTUAL_NETTY_OPTS=$(build_netty_opts)
EXPECTED_NETTY_OPTS="-Dio.netty.leakDetectionLevel=disabled \
-Dio.netty.recycler.maxCapacity.default=1000 \
-Dio.netty.recycler.linkCapacity=1024"
EXPECTED_NETTY_OPTS="-Dio.netty.leakDetectionLevel=disabled"

assertEquals "Netty OPTS is not set correctly" "${EXPECTED_NETTY_OPTS}" "${ACTUAL_NETTY_OPTS}"
}

0 comments on commit daf5264

Please sign in to comment.