Merge branch 'cassandra-5.0' into trunk

This commit is contained in:
Stefan Miklosovic 2025-07-31 09:17:01 +02:00
commit 1e5c07af32
No known key found for this signature in database
GPG Key ID: 32F35CB2F546D93E
5 changed files with 16 additions and 31 deletions

View File

@ -207,6 +207,7 @@
* Add the ability to disable bulk loading of SSTables (CASSANDRA-18781) * Add the ability to disable bulk loading of SSTables (CASSANDRA-18781)
* Clean up obsolete functions and simplify cql_version handling in cqlsh (CASSANDRA-18787) * Clean up obsolete functions and simplify cql_version handling in cqlsh (CASSANDRA-18787)
Merged from 5.0: Merged from 5.0:
* Do not source cassandra-env.sh unnecessarily in nodetool and other tooling (CASSANDRA-20745)
* Make source distribution buildable by ant artifacts as doc/scripts/process-native-protocol-specs-in-docker.sh was not executable (CASSANDRA-20802) * Make source distribution buildable by ant artifacts as doc/scripts/process-native-protocol-specs-in-docker.sh was not executable (CASSANDRA-20802)
* SSTableIndexWriter#abort() should log more quietly in cases where an exception is not provided (CASSANDRA-20695) * SSTableIndexWriter#abort() should log more quietly in cases where an exception is not provided (CASSANDRA-20695)
* Avoid availability gap between UP and queryability marking for already built SAI indexes on bounce (CASSANDRA-20732) * Avoid availability gap between UP and queryability marking for already built SAI indexes on bounce (CASSANDRA-20732)

View File

@ -43,20 +43,21 @@ if [ -z "$CASSANDRA_CONF" -o -z "$CLASSPATH" ]; then
exit 1 exit 1
fi fi
# Run cassandra-env.sh to pick up JMX_PORT JMX_PORT=""
# Try to parse port from configure_jmx method call, when not commented out
if [ -f "$CASSANDRA_CONF/cassandra-env.sh" ]; then if [ -f "$CASSANDRA_CONF/cassandra-env.sh" ]; then
JVM_OPTS_SAVE=$JVM_OPTS jmx_method_call=$(grep "^configure_jmx \+[0-9]\+$" "$CASSANDRA_CONF/cassandra-env.sh")
MAX_HEAP_SIZE_SAVE=$MAX_HEAP_SIZE if [ ! "x${jmx_method_call}" = "x" ]; then
. "$CASSANDRA_CONF/cassandra-env.sh" JMX_PORT=$(echo "${jmx_method_call}" | tr -s " " | cut -d " " -f2)
MAX_HEAP_SIZE=$MAX_HEAP_SIZE_SAVE fi
JVM_OPTS="$JVM_OPTS_SAVE"
fi fi
# In case JMX_PORT is not set (when configure_jmx in cassandra-env.sh is commented out), # In case JMX_PORT is not set (when configure_jmx in cassandra-env.sh is commented out),
# try to parse it from cassandra.yaml. # try to parse it from cassandra.yaml.
if [ "x$JMX_PORT" = "x" ]; then if [ "x$JMX_PORT" = "x" ]; then
if [ -f "$CASSANDRA_CONF/cassandra.yaml" ]; then if [ -f "$CASSANDRA_CONF/cassandra.yaml" ]; then
JMX_PORT=`grep jmx_port $CASSANDRA_CONF/cassandra.yaml | cut -d ':' -f 2 | tr -d '[[:space:]]'` JMX_PORT=$(grep jmx_port "$CASSANDRA_CONF/cassandra.yaml" | cut -d ':' -f 2 | tr -d '[[:space:]]')
fi fi
fi fi
@ -111,6 +112,11 @@ if [ "x$MAX_HEAP_SIZE" = "x" ]; then
MAX_HEAP_SIZE="128m" MAX_HEAP_SIZE="128m"
fi fi
# Sets the path where logback and GC logs are written.
if [ "x$CASSANDRA_LOG_DIR" = "x" ] ; then
CASSANDRA_LOG_DIR="$CASSANDRA_HOME/logs"
fi
CMD=$(echo "$JAVA" $JAVA_AGENT -ea -cp "$CLASSPATH" $JVM_OPTS -Xmx$MAX_HEAP_SIZE \ CMD=$(echo "$JAVA" $JAVA_AGENT -ea -cp "$CLASSPATH" $JVM_OPTS -Xmx$MAX_HEAP_SIZE \
-XX:ParallelGCThreads=1 \ -XX:ParallelGCThreads=1 \
-Dcassandra.storagedir="$cassandra_storagedir" \ -Dcassandra.storagedir="$cassandra_storagedir" \

View File

@ -291,8 +291,8 @@ configure_jmx()
# We will be expecting the settings in jmx_server_options and jmx_encryption_options respectively instead. # We will be expecting the settings in jmx_server_options and jmx_encryption_options respectively instead.
# The argument specifies the default port over which Cassandra will be available for JMX connections. # The argument specifies the default port over which Cassandra will be available for JMX connections.
# #
# If you comment out configure_jmx method call, then JMX_PORT variable will not be set, which means # If you comment out configure_jmx method call, then the port argument of configure_jmx function will not be used
# nodetool which sources this file will not see it either and port from cassandra.yaml will be parsed instead, # when nodetool parses this file and port from cassandra.yaml will be parsed instead,
# if not found there either, it defaults to 7199. # if not found there either, it defaults to 7199.
# #
# For security reasons, you should not expose this port to the internet. Firewall it if needed. # For security reasons, you should not expose this port to the internet. Firewall it if needed.

View File

@ -37,17 +37,6 @@ if [ -z "$CASSANDRA_CONF" -o -z "$CLASSPATH" ]; then
exit 1 exit 1
fi fi
# Run cassandra-env.sh to pick up JMX_PORT
if [ -f "$CASSANDRA_CONF/cassandra-env.sh" ]; then
JVM_OPTS_SAVE=$JVM_OPTS
MAX_HEAP_SIZE_SAVE=$MAX_HEAP_SIZE
. "$CASSANDRA_CONF/cassandra-env.sh"
MAX_HEAP_SIZE=$MAX_HEAP_SIZE_SAVE
JVM_OPTS=$JVM_OPTS_SAVE
fi
# JMX Port passed via cmd line args (-p 9999 / --port 9999 / --port=9999)
# should override the value from cassandra-env.sh
ARGS="" ARGS=""
JVM_ARGS="" JVM_ARGS=""
while true while true

View File

@ -37,17 +37,6 @@ if [ -z "$CASSANDRA_CONF" -o -z "$CLASSPATH" ]; then
exit 1 exit 1
fi fi
# Run cassandra-env.sh to pick up JMX_PORT
if [ -f "$CASSANDRA_CONF/cassandra-env.sh" ]; then
JVM_OPTS_SAVE=$JVM_OPTS
MAX_HEAP_SIZE_SAVE=$MAX_HEAP_SIZE
. "$CASSANDRA_CONF/cassandra-env.sh"
MAX_HEAP_SIZE=$MAX_HEAP_SIZE_SAVE
JVM_OPTS=$JVM_OPTS_SAVE
fi
# JMX Port passed via cmd line args (-p 9999 / --port 9999 / --port=9999)
# should override the value from cassandra-env.sh
ARGS="" ARGS=""
JVM_ARGS="" JVM_ARGS=""
while true while true