upsert uses commas as the delimiter between options which doesn't work for a few C* options that use commas in the value.
Inject works by taking the string and adding it to the end of the jvm-server.options file verbatim. While the comments in that file say it expects one option per line there is nothing that actually enforces that rule. The line only needs to start with a '-'
Code that parses the options file:
JVM_OPTS_FILE=$CASSANDRA_CONF/jvm${jvmoptions_variant:--clients}.options if [ $JAVA_VERSION -ge 11 ] ; then
JVM_DEP_OPTS_FILE=$CASSANDRA_CONF/jvm11${jvmoptions_variant:--clients}.options
else
JVM_DEP_OPTS_FILE=$CASSANDRA_CONF/jvm8${jvmoptions_variant:--clients}.options
fi
for opt in `grep "^-" $JVM_OPTS_FILE` `grep "^-" $JVM_DEP_OPTS_FILE` do
JVM_OPTS="$JVM_OPTS $opt"
done
upsert uses commas as the delimiter between options which doesn't work for a few C* options that use commas in the value.
Inject works by taking the string and adding it to the end of the jvm-server.options file verbatim. While the comments in that file say it expects one option per line there is nothing that actually enforces that rule. The line only needs to start with a '-'
Code that parses the options file: