You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by mc...@apache.org on 2020/06/24 11:00:53 UTC

[cassandra] branch trunk updated: Fail fast when -Xmn is set when the G1 garbage collector is enabled

This is an automated email from the ASF dual-hosted git repository.

mck pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 3cfe3c9  Fail fast when -Xmn is set when the G1 garbage collector is enabled
3cfe3c9 is described below

commit 3cfe3c9f0dcf8ca8b25ad111800a21725bf152cb
Author: Jeremy Hanna <je...@gmail.com>
AuthorDate: Mon Jun 1 15:44:55 2020 +1000

    Fail fast when -Xmn is set when the G1 garbage collector is enabled
    
     patch by Jeremy Hanna; reviewed by Anthony Grasso for CASSANDRA-15839
---
 CHANGES.txt           | 1 +
 conf/cassandra-env.sh | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/CHANGES.txt b/CHANGES.txt
index daae839..30d111e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -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)
diff --git a/conf/cassandra-env.sh b/conf/cassandra-env.sh
index 724498a..10fbf31 100644
--- a/conf/cassandra-env.sh
+++ b/conf/cassandra-env.sh
@@ -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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org