Fail fast when -Xmn is set when the G1 garbage collector is enabled

patch by Jeremy Hanna; reviewed by Anthony Grasso for CASSANDRA-15839
This commit is contained in:
Jeremy Hanna 2020-06-01 15:44:55 +10:00 committed by Mick Semb Wever
parent 853b599337
commit 3cfe3c9f0d
No known key found for this signature in database
GPG Key ID: E91335D77E3E87CB
2 changed files with 8 additions and 0 deletions

View File

@ -1,4 +1,5 @@
4.0-alpha5
* Fail startup if -Xmn is set when the G1 garbage collector is used (CASSANDRA-15839)
* generateSplits method replaced the generateRandomTokens for ReplicationAwareTokenAllocator. (CASSANDRA-15877)
* Several mbeans are not unregistered when dropping a keyspace and table (CASSANDRA-14888)
* Update defaults for server and client TLS settings (CASSANDRA-15262)

View File

@ -176,6 +176,13 @@ elif [ $DEFINED_XMN -ne 0 ] && [ $USING_CMS -eq 0 ]; then
JVM_OPTS="$JVM_OPTS -Xmn${HEAP_NEWSIZE}"
fi
# We fail to start if -Xmn is used with G1 GC is being used
# See comments for -Xmn in jvm-server.options
if [ $DEFINED_XMN -eq 0 ] && [ $USING_G1 -eq 0 ]; then
echo "It is not recommended to set -Xmn with the G1 garbage collector. See comments for -Xmn in jvm-server.options for details."
exit 1
fi
if [ "$JVM_ARCH" = "64-Bit" ] && [ $USING_CMS -eq 0 ]; then
JVM_OPTS="$JVM_OPTS -XX:+UseCondCardMark"
fi