lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject [1/8] lucene-solr:jira/http2: Java 9+ GC Logging filesize parameter should be 20M instead of 20000
Date Fri, 19 Oct 2018 00:49:53 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/jira/http2 b9431da54 -> d40612271


Java 9+ GC Logging filesize parameter should be 20M instead of 20000

JEP 158 (https://openjdk.java.net/jeps/158) says the filesize parameter is the “file size
in kb” however that appears to not be the case since when it is set to a value of 20000
you end up with GC logs that are only 20000 bytes in length.  Setting the value to 20M produces
the desired result of GC log files that are 20MB in size.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/5202a713
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/5202a713
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/5202a713

Branch: refs/heads/jira/http2
Commit: 5202a713baad4c7b743ad5ccd5db2bc079672d84
Parents: 73a413c
Author: Tim Underwood <timunderwood@gmail.com>
Authored: Mon Oct 15 12:52:12 2018 -0700
Committer: Tim Underwood <timunderwood@gmail.com>
Committed: Mon Oct 15 12:52:40 2018 -0700

----------------------------------------------------------------------
 solr/bin/solr     | 2 +-
 solr/bin/solr.cmd | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5202a713/solr/bin/solr
----------------------------------------------------------------------
diff --git a/solr/bin/solr b/solr/bin/solr
index 804ef2b..78840fd 100755
--- a/solr/bin/solr
+++ b/solr/bin/solr
@@ -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

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5202a713/solr/bin/solr.cmd
----------------------------------------------------------------------
diff --git a/solr/bin/solr.cmd b/solr/bin/solr.cmd
index 005ea59..774e721 100755
--- a/solr/bin/solr.cmd
+++ b/solr/bin/solr.cmd
@@ -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


Mime
View raw message