Hi,

When starting Cassandra nodes, CCM uses the current env Java distribution
(defined by the JAVA_HOME env variable). This behavior is overridden in
three cases:

- Java version is not supported by the selected Cassandra distribution - in
which case, CCM looks for supported Java distribution across JAVAx_HOME env
variables

- Java version is specified explicitly (--jvm-version arg or jvm_version
param if used in Python)

- CASSANDRA_USE_JDK11 is defined in env, in which case, for Cassandra 4.x
CCM forces to use only JDK11

I want to ask you guys whether you are okay with removing the third
exception. If we remove it, Cassandra 4.x will not be treated in any
special way—CCM will use the current Java version, so if it is Java 11, it
will use Java 11 (and automatically set CASSANDRA_USE_JDK11), and if it is
Java 8, it will use Java 8 (and automatically unset CASSANDRA_USE_JDK11).

I think there is no need for CCM to use CASSANDRA_USE_JDK11 to make a
decision about which Java version to use as it adds more complexity, makes
it work differently for Cassandra 4.x than for other Cassandra versions,
and actually provides no value at all because if we work with Cassandra
having our env configured for Java 11, we have to have CASSANDRA_USE_JDK11
and if not, we cannot have it. Therefore, CCM can be based solely on the
current Java version and not include the existence of CASSANDRA_USE_JDK11
in the Java version selection process.

WDYT?

- - -- --- ----- -------- -------------
Jacek Lewandowski

Reply via email to