mirror of https://github.com/apache/lucene.git
SOLR-7392: Fix SOLR_JAVA_MEM and SOLR_OPTS customizations in solr.in.sh being ignored
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1674565 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a4369f070e
commit
19e25c78b6
|
@ -135,6 +135,9 @@ Bug Fixes
|
||||||
|
|
||||||
* SOLR-7420: Overseer stats are not reset on loss of ZK connection. (Jessica Cheng, shalin)
|
* SOLR-7420: Overseer stats are not reset on loss of ZK connection. (Jessica Cheng, shalin)
|
||||||
|
|
||||||
|
* SOLR-7392: Fix SOLR_JAVA_MEM and SOLR_OPTS customizations in solr.in.sh being ignored
|
||||||
|
(Ramkumar Aiyengar, Ere Maijala)
|
||||||
|
|
||||||
Optimizations
|
Optimizations
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
|
|
|
@ -780,7 +780,7 @@ fi
|
||||||
# Run in foreground (default is to run in the background)
|
# Run in foreground (default is to run in the background)
|
||||||
FG="false"
|
FG="false"
|
||||||
noprompt=false
|
noprompt=false
|
||||||
SOLR_OPTS=()
|
SOLR_OPTS=($SOLR_OPTS)
|
||||||
|
|
||||||
if [ $# -gt 0 ]; then
|
if [ $# -gt 0 ]; then
|
||||||
while true; do
|
while true; do
|
||||||
|
@ -1070,10 +1070,11 @@ if [[ "$SCRIPT_CMD" == "stop" && -z "$SOLR_PORT" ]]; then
|
||||||
fi
|
fi
|
||||||
rm -f "$PIDF"
|
rm -f "$PIDF"
|
||||||
done
|
done
|
||||||
# TODO: This doesn't get reflected across the subshell
|
# TODO: none_stopped doesn't get reflected across the subshell
|
||||||
if $none_stopped; then
|
# This can be uncommented once we find a clean way out of it
|
||||||
echo -e "\nNo Solr nodes found to stop.\n"
|
# if $none_stopped; then
|
||||||
fi
|
# echo -e "\nNo Solr nodes found to stop.\n"
|
||||||
|
# fi
|
||||||
else
|
else
|
||||||
# not stopping all and don't have a port, but if we can find the pid file for the default port 8983, then use that
|
# not stopping all and don't have a port, but if we can find the pid file for the default port 8983, then use that
|
||||||
none_stopped=true
|
none_stopped=true
|
||||||
|
@ -1253,13 +1254,12 @@ else
|
||||||
REMOTE_JMX_OPTS=()
|
REMOTE_JMX_OPTS=()
|
||||||
fi
|
fi
|
||||||
|
|
||||||
SOLR_JAVA_MEM=()
|
JAVA_MEM_OPTS=()
|
||||||
if [ "$SOLR_HEAP" != "" ]; then
|
if [ -z "$SOLR_HEAP" ] && [ -n "$SOLR_JAVA_MEM" ]; then
|
||||||
SOLR_JAVA_MEM=("-Xms$SOLR_HEAP" "-Xmx$SOLR_HEAP")
|
JAVA_MEM_OPTS=($SOLR_JAVA_MEM)
|
||||||
fi
|
else
|
||||||
|
SOLR_HEAP="${SOLR_HEAP:-512m}"
|
||||||
if [ -z "$SOLR_JAVA_MEM" ]; then
|
JAVA_MEM_OPTS=("-Xms$SOLR_HEAP" "-Xmx$SOLR_HEAP")
|
||||||
SOLR_JAVA_MEM=('-Xms512m' '-Xmx512m')
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$SOLR_TIMEZONE" ]; then
|
if [ -z "$SOLR_TIMEZONE" ]; then
|
||||||
|
@ -1305,7 +1305,7 @@ function launch_solr() {
|
||||||
echo -e " SOLR_HOST = $SOLR_HOST"
|
echo -e " SOLR_HOST = $SOLR_HOST"
|
||||||
echo -e " SOLR_PORT = $SOLR_PORT"
|
echo -e " SOLR_PORT = $SOLR_PORT"
|
||||||
echo -e " STOP_PORT = $STOP_PORT"
|
echo -e " STOP_PORT = $STOP_PORT"
|
||||||
echo -e " SOLR_JAVA_MEM = ${SOLR_JAVA_MEM[@]}"
|
echo -e " JAVA_MEM_OPTS = ${JAVA_MEM_OPTS[@]}"
|
||||||
echo -e " GC_TUNE = ${GC_TUNE[@]}"
|
echo -e " GC_TUNE = ${GC_TUNE[@]}"
|
||||||
echo -e " GC_LOG_OPTS = ${GC_LOG_OPTS[@]}"
|
echo -e " GC_LOG_OPTS = ${GC_LOG_OPTS[@]}"
|
||||||
echo -e " SOLR_TIMEZONE = $SOLR_TIMEZONE"
|
echo -e " SOLR_TIMEZONE = $SOLR_TIMEZONE"
|
||||||
|
@ -1337,7 +1337,7 @@ function launch_solr() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
SOLR_START_OPTS=('-server' '-Xss256k' "${SOLR_JAVA_MEM[@]}" "${GC_TUNE[@]}" "${GC_LOG_OPTS[@]}" \
|
SOLR_START_OPTS=('-server' '-Xss256k' "${JAVA_MEM_OPTS[@]}" "${GC_TUNE[@]}" "${GC_LOG_OPTS[@]}" \
|
||||||
"${REMOTE_JMX_OPTS[@]}" "${CLOUD_MODE_OPTS[@]}" \
|
"${REMOTE_JMX_OPTS[@]}" "${CLOUD_MODE_OPTS[@]}" \
|
||||||
"-Djetty.port=$SOLR_PORT" "-DSTOP.PORT=$stop_port" "-DSTOP.KEY=$STOP_KEY" \
|
"-Djetty.port=$SOLR_PORT" "-DSTOP.PORT=$stop_port" "-DSTOP.KEY=$STOP_KEY" \
|
||||||
"${SOLR_HOST_ARG[@]}" "-Duser.timezone=$SOLR_TIMEZONE" \
|
"${SOLR_HOST_ARG[@]}" "-Duser.timezone=$SOLR_TIMEZONE" \
|
||||||
|
|
|
@ -18,8 +18,12 @@
|
||||||
# affecting other Java applications on your server/workstation.
|
# affecting other Java applications on your server/workstation.
|
||||||
#SOLR_JAVA_HOME=""
|
#SOLR_JAVA_HOME=""
|
||||||
|
|
||||||
# Increase Java Min/Max Heap as needed to support your indexing / query needs
|
# Increase Java Heap as needed to support your indexing / query needs
|
||||||
SOLR_JAVA_MEM="-Xms512m -Xmx512m"
|
SOLR_HEAP="512m"
|
||||||
|
|
||||||
|
# Expert: If you want finer control over memory options, specify them directly
|
||||||
|
# Comment out SOLR_HEAP if you are using this though, that takes precedence
|
||||||
|
#SOLR_JAVA_MEM="-Xms512m -Xmx512m"
|
||||||
|
|
||||||
# Enable verbose GC logging
|
# Enable verbose GC logging
|
||||||
GC_LOG_OPTS="-verbose:gc -XX:+PrintHeapAtGC -XX:+PrintGCDetails \
|
GC_LOG_OPTS="-verbose:gc -XX:+PrintHeapAtGC -XX:+PrintGCDetails \
|
||||||
|
|
Loading…
Reference in New Issue