Skip to content

Commit

Permalink
Fix check for -Xlog in cassandra-env.sh
Browse files Browse the repository at this point in the history
 patch by Yakir Gibraltar; reviewed by Adam Holmberg, Mick Semb Wever for CASSANDRA-16279
  • Loading branch information
aholmberg authored and michaelsembwever committed Jan 8, 2021
1 parent 1596c37 commit 023eecb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
@@ -1,4 +1,5 @@
4.0-beta5
* Fix check for -Xlog in cassandra-env.sh (CASSANDRA-16279)
* SSLFactory should initialize SSLContext before setting protocols (CASSANDRA-16362)
* Restore sasi dependencies jflex, snowball-stemmer, and concurrent-trees, in the cassandra-all pom (CASSANDRA-16303)
* Fix DecimalDeserializer#toString OOM (CASSANDRA-14925)
Expand Down
4 changes: 2 additions & 2 deletions conf/cassandra-env.sh
Expand Up @@ -95,15 +95,15 @@ fi
if [ $JAVA_VERSION -ge 11 ] ; then
# See description of https://bugs.openjdk.java.net/browse/JDK-8046148 for details about the syntax
# The following is the equivalent to -XX:+PrintGCDetails -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=10M
echo "$JVM_OPTS" | grep -q "^-[X]log:gc"
echo "$JVM_OPTS" | grep -qe "-[X]log:gc"
if [ "$?" = "1" ] ; then # [X] to prevent ccm from replacing this line
# only add -Xlog:gc if it's not mentioned in jvm-server.options file
mkdir -p ${CASSANDRA_LOG_DIR}
JVM_OPTS="$JVM_OPTS -Xlog:gc=info,heap*=trace,age*=debug,safepoint=info,promotion*=trace:file=${CASSANDRA_LOG_DIR}/gc.log:time,uptime,pid,tid,level:filecount=10,filesize=10485760"
fi
else
# Java 8
echo "$JVM_OPTS" | grep -q "^-[X]loggc"
echo "$JVM_OPTS" | grep -qe "-[X]loggc"
if [ "$?" = "1" ] ; then # [X] to prevent ccm from replacing this line
# only add -Xlog:gc if it's not mentioned in jvm-server.options file
mkdir -p ${CASSANDRA_LOG_DIR}
Expand Down

0 comments on commit 023eecb

Please sign in to comment.