SOLR-12874: Java 9+ GC Logging filesize parameter should use a unit

(merge branch 'java9plus_gc_logging_filesize' of https://github.com/tpunder/lucene-solr); this closes #470
This commit is contained in:
Uwe Schindler 2018-10-17 23:24:51 +02:00
commit 4b2136eb3c
3 changed files with 4 additions and 2 deletions

View File

@ -193,6 +193,8 @@ Bug Fixes
* SOLR-12851: Improvements and fixes to let and select Streaming Expressions (Joel Bernstein)
* SOLR-12874: Java 9+ GC Logging filesize parameter should use a unit. (Tim Underwood via Uwe Schindler)
Improvements
----------------------

View File

@ -1911,7 +1911,7 @@ if [ "$GC_LOG_OPTS" != "" ]; then
# for simplicity, we only look at the prefix '-Xlog:gc'
# (if 'all' or multiple tags are used starting with anything other then 'gc' the user is on their own)
# if a single additional ':' exists in param, then there is already an explicit output specifier
GC_LOG_OPTS[$i]=$(echo ${GC_LOG_OPTS[$i]} | sed "s|^\(-Xlog:gc[^:]*$\)|\1:file=$SOLR_LOGS_DIR/solr_gc.log:time,uptime:filecount=9,filesize=20000|")
GC_LOG_OPTS[$i]=$(echo ${GC_LOG_OPTS[$i]} | sed "s|^\(-Xlog:gc[^:]*$\)|\1:file=$SOLR_LOGS_DIR/solr_gc.log:time,uptime:filecount=9,filesize=20M|")
done
fi
fi

View File

@ -1182,7 +1182,7 @@ if !JAVA_MAJOR_VERSION! GEQ 9 (
echo ERROR: On Java 9 you cannot set GC_LOG_OPTS, only default GC logging is available. Exiting
GOTO :eof
)
set GC_LOG_OPTS="-Xlog:gc*:file=\"!SOLR_LOGS_DIR!\solr_gc.log\":time,uptime:filecount=9,filesize=20000"
set GC_LOG_OPTS="-Xlog:gc*:file=\"!SOLR_LOGS_DIR!\solr_gc.log\":time,uptime:filecount=9,filesize=20M"
) else (
IF "%GC_LOG_OPTS%"=="" (
rem Set defaults for Java 8