malliaridis commented on code in PR #2792: URL: https://github.com/apache/solr/pull/2792#discussion_r1815543421
########## solr/bin/solr: ########## @@ -1054,31 +1054,13 @@ fi # Establish default GC logging opts if no env var set (otherwise init to sensible default) if [ -z "${GC_LOG_OPTS}" ]; then - if [[ "$JAVA_VER_NUM" -lt "9" ]] ; then - GC_LOG_OPTS=('-verbose:gc' '-XX:+PrintHeapAtGC' '-XX:+PrintGCDetails' \ - '-XX:+PrintGCDateStamps' '-XX:+PrintGCTimeStamps' '-XX:+PrintTenuringDistribution' \ - '-XX:+PrintGCApplicationStoppedTime') - else - GC_LOG_OPTS=('-Xlog:gc*') - fi -else - # TODO: Should probably not overload GC_LOG_OPTS as both string and array, but leaving it be for now - # shellcheck disable=SC2128 - GC_LOG_OPTS=($GC_LOG_OPTS) + GC_LOG_OPTS=('-Xlog:gc*') fi # if verbose gc logging enabled, setup the location of the log file and rotation if [ "${#GC_LOG_OPTS[@]}" -gt 0 ]; then - if [[ "$JAVA_VER_NUM" -lt "9" ]] || [ "$JAVA_VENDOR" == "OpenJ9" ]; then - gc_log_flag="-Xloggc" - if [ "$JAVA_VENDOR" == "OpenJ9" ]; then - gc_log_flag="-Xverbosegclog" - fi - if [ -z ${JAVA8_GC_LOG_FILE_OPTS+x} ]; then Review Comment: From my understanding that is right. The reason I removed this check is because we do not support Java 8, and as the environment variable indicates, this is only relevant for users running SOlr with Java 8 and setting this value. I couldn't find any references in the documentation, so since it is not documented, I assume that this value is always not set for any Solr version 10+ that only supports Java 21+, and the condition is therefore always `true`. If a condition is here relevant, we should definitely use a suitable name other than `JAVA8_*` and reintroduce the check. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org