This is an automated email from the ASF dual-hosted git repository.

aaronai pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git


The following commit(s) were added to refs/heads/develop by this push:
     new c9975961f Remove uncompatible sed in runserver.sh
c9975961f is described below

commit c9975961f81292f62c2c47f9e58f64472653ea7e
Author: Aaron Ai <[email protected]>
AuthorDate: Mon Mar 6 15:11:09 2023 +0800

    Remove uncompatible sed in runserver.sh
---
 distribution/bin/runserver.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/distribution/bin/runserver.sh b/distribution/bin/runserver.sh
index 0f8b5b3e5..cdb31e40e 100644
--- a/distribution/bin/runserver.sh
+++ b/distribution/bin/runserver.sh
@@ -80,7 +80,7 @@ choose_gc_options()
 {
     # Example of JAVA_MAJOR_VERSION value : '1', '9', '10', '11', ...
     # '1' means releases befor Java 9
-    JAVA_MAJOR_VERSION=$("$JAVA" -version 2>&1 | sed -r -n 's/.* version 
"([0-9]*).*$/\1/p')
+    JAVA_MAJOR_VERSION=$("$JAVA" -version 2>&1 | awk -F '"' '/version/ {print 
$2}' | awk -F '.' '{print $1}')
     if [ -z "$JAVA_MAJOR_VERSION" ] || [ "$JAVA_MAJOR_VERSION" -lt "9" ] ; then
       JAVA_OPT="${JAVA_OPT} -server -Xms4g -Xmx4g -Xmn2g 
-XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m"
       JAVA_OPT="${JAVA_OPT} -XX:+UseConcMarkSweepGC 
-XX:+UseCMSCompactAtFullCollection -XX:CMSInitiatingOccupancyFraction=70 
-XX:+CMSParallelRemarkEnabled -XX:SoftRefLRUPolicyMSPerMB=0 
-XX:+CMSClassUnloadingEnabled -XX:SurvivorRatio=8 -XX:-UseParNewGC"

Reply via email to