Skip to content

Commit

Permalink
[netty] remove no longer used properties io.netty.recycler.linkCapaci…
Browse files Browse the repository at this point in the history
…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 daf5264
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 18 deletions.
6 changes: 1 addition & 5 deletions bin/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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() {
Expand Down
6 changes: 1 addition & 5 deletions bin/common_gradle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion stream/conf/streamstorage_cli_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
2 changes: 1 addition & 1 deletion stream/conf/streamstorage_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
4 changes: 1 addition & 3 deletions tests/scripts/src/test/bash/bk_test_bin_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
}
Expand Down
4 changes: 1 addition & 3 deletions tests/scripts/src/test/bash/gradle/bk_test_bin_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
}
Expand Down

0 comments on commit daf5264

Please sign in to comment.