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/01/02 10:29:31 UTC

[cassandra] 01/01: Merge branch 'cassandra-3.11' into trunk

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

commit 2da9af002a22fd685cf3bf05243302c94c8b1d45
Merge: e3af8ff 1381c87
Author: Mick Semb Wever <mc...@apache.org>
AuthorDate: Thu Jan 2 11:28:08 2020 +0100

    Merge branch 'cassandra-3.11' into trunk

 CHANGES.txt           |  1 +
 conf/cassandra-env.sh | 13 +++++++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --cc CHANGES.txt
index a3462d1,8c30d4c..81b095c
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,18 -1,9 +1,19 @@@
 -3.11.6
 +4.0-alpha3
 + * Prevent read repair mutations from increasing read timeout (CASSANDRA-15442)
 + * Document 4.0 system keyspace changes, bump generations (CASSANDRA-15454)
 + * Make it possible to disable STCS-in-L0 during runtime (CASSANDRA-15445)
 + * Removed obsolete OldNetworkTopologyStrategy (CASSANDRA-13990)
 + * Align record header of FQL and audit binary log (CASSANDRA-15076)
 + * Shuffle forwarding replica for messages to non-local DC (CASSANDRA-15318)
 + * Optimise native protocol ASCII string encoding (CASSANDRA-15410)
 + * Make sure all exceptions are propagated in DebuggableThreadPoolExecutor (CASSANDRA-15332)
 + * Make it possible to resize concurrent read / write thread pools at runtime (CASSANDRA-15277)
 + * Close channels on error (CASSANDRA-15407)
 +Merged from 3.11:
   * Fix nodetool compactionstats showing extra pending task for TWCS - patch implemented (CASSANDRA-15409)
   * Fix SELECT JSON formatting for the "duration" type (CASSANDRA-15075)
 - * Fix LegacyLayout to have same behavior as 2.x when handling unknown column names (CASSANDRA-15081)
  Merged from 3.0:
+  * GC logs are also put under $CASSANDRA_LOG_DIR (CASSANDRA-14306)
   * Fix sstabledump's position key value when partitions have multiple rows (CASSANDRA-14721)
   * Avoid over-scanning data directories in LogFile.verify() (CASSANDRA-15364)
   * Bump generations and document changes to system_distributed and system_traces in 3.0, 3.11
diff --cc conf/cassandra-env.sh
index b77f165,a640847..724498a
--- a/conf/cassandra-env.sh
+++ b/conf/cassandra-env.sh
@@@ -86,27 -86,60 +86,32 @@@ calculate_heap_sizes(
      fi
  }
  
 -# Determine the sort of JVM we'll be running on.
 -java_ver_output=`"${JAVA:-java}" -version 2>&1`
 -jvmver=`echo "$java_ver_output" | grep '[openjdk|java] version' | awk -F'"' 'NR==1 {print $2}' | cut -d\- -f1`
 -JVM_VERSION=${jvmver%_*}
 -JVM_PATCH_VERSION=${jvmver#*_}
 -
 -if [ "$JVM_VERSION" \< "1.8" ] ; then
 -    echo "Cassandra 3.0 and later require Java 8u40 or later."
 -    exit 1;
 -fi
 -
 -if [ "$JVM_VERSION" \< "1.8" ] && [ "$JVM_PATCH_VERSION" -lt 40 ] ; then
 -    echo "Cassandra 3.0 and later require Java 8u40 or later."
 -    exit 1;
 -fi
 -
 -jvm=`echo "$java_ver_output" | grep -A 1 '[openjdk|java] version' | awk 'NR==2 {print $1}'`
 -case "$jvm" in
 -    OpenJDK)
 -        JVM_VENDOR=OpenJDK
 -        # this will be "64-Bit" or "32-Bit"
 -        JVM_ARCH=`echo "$java_ver_output" | awk 'NR==3 {print $2}'`
 -        ;;
 -    "Java(TM)")
 -        JVM_VENDOR=Oracle
 -        # this will be "64-Bit" or "32-Bit"
 -        JVM_ARCH=`echo "$java_ver_output" | awk 'NR==3 {print $3}'`
 -        ;;
 -    *)
 -        # Help fill in other JVM values
 -        JVM_VENDOR=other
 -        JVM_ARCH=unknown
 -        ;;
 -esac
 -
+ # Sets the path where logback and GC logs are written.
+ if [ "x$CASSANDRA_LOG_DIR" = "x" ] ; then
+     CASSANDRA_LOG_DIR="$CASSANDRA_HOME/logs"
+ fi
+ 
  #GC log path has to be defined here because it needs to access CASSANDRA_HOME
 -JVM_OPTS="$JVM_OPTS -Xloggc:${CASSANDRA_LOG_DIR}/gc.log"
 -
 -# Here we create the arguments that will get passed to the jvm when
 -# starting cassandra.
 -
 -# Read user-defined JVM options from jvm.options file
 -JVM_OPTS_FILE=$CASSANDRA_CONF/jvm.options
 -for opt in `grep "^-" $JVM_OPTS_FILE`
 -do
 -  JVM_OPTS="$JVM_OPTS $opt"
 -done
 +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"
 +    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_HOME}/logs
-         JVM_OPTS="$JVM_OPTS -Xlog:gc=info,heap*=trace,age*=debug,safepoint=info,promotion*=trace:file=${CASSANDRA_HOME}/logs/gc.log:time,uptime,pid,tid,level:filecount=10,filesize=10485760"
++        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"
 +    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_HOME}/logs
-         JVM_OPTS="$JVM_OPTS -Xloggc:${CASSANDRA_HOME}/logs/gc.log"
++        mkdir -p ${CASSANDRA_LOG_DIR}
++        JVM_OPTS="$JVM_OPTS -Xloggc:${CASSANDRA_LOG_DIR}/gc.log"
 +    fi
 +fi
  
 -# Check what parameters were defined on jvm.options file to avoid conflicts
 +# Check what parameters were defined on jvm-server.options file to avoid conflicts
  echo $JVM_OPTS | grep -q Xmn
  DEFINED_XMN=$?
  echo $JVM_OPTS | grep -q Xmx


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