This is an automated email from the ASF dual-hosted git repository.
houston pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9x by this push:
new 6ddfcc841b2 SOLR-16482: Add internal envVar for passing opts to
solr/bin (#1096)
6ddfcc841b2 is described below
commit 6ddfcc841b2f78fc481547b618c277eeafbfad1c
Author: Houston Putman <[email protected]>
AuthorDate: Thu Oct 20 11:58:47 2022 -0400
SOLR-16482: Add internal envVar for passing opts to solr/bin (#1096)
The name of the envVar is SOLR_OPTS_INTERNAL
(cherry picked from commit fabdc8e836264f309c0224ef190abe13bb749641)
---
solr/CHANGES.txt | 2 ++
solr/bin/solr | 5 +++++
solr/bin/solr.cmd | 1 +
3 files changed, 8 insertions(+)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index d15e8c22b11..a902c22e6c1 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -285,6 +285,8 @@ Other Changes
* SOLR-16464: Upgrade commons-text to 1.10.0 (Kevin Risden)
+* SOLR-16482: Add an internal envVar for passing options to bin/solr that will
not be overriden by the user. (Houston Putman)
+
Build
---------------------
* SOLR-16204: Change Lucene dependency to Lucene 9.1.0 (Elia Porciani via
Alessandro Benedetti)
diff --git a/solr/bin/solr b/solr/bin/solr
index 06ec0727d85..fd0a7d6a36f 100755
--- a/solr/bin/solr
+++ b/solr/bin/solr
@@ -2181,6 +2181,11 @@ function start_solr() {
SOLR_OPTS+=($AUTHC_OPTS)
fi
+ # If there are internal options set by Solr (users should not use this
variable), add them to SOLR_OPTS
+ if [ -n "$SOLR_OPTS_INTERNAL" ]; then
+ SOLR_OPTS+=($SOLR_OPTS_INTERNAL)
+ fi
+
# If a heap dump directory is specified, enable it in SOLR_OPTS
if [[ -z "${SOLR_HEAP_DUMP_DIR:-}" ]] && [[ "${SOLR_HEAP_DUMP:-}" == "true"
]]; then
SOLR_HEAP_DUMP_DIR="${SOLR_LOGS_DIR}/dumps"
diff --git a/solr/bin/solr.cmd b/solr/bin/solr.cmd
index b243f1ad6b7..17ccf4f83f0 100755
--- a/solr/bin/solr.cmd
+++ b/solr/bin/solr.cmd
@@ -1338,6 +1338,7 @@ IF NOT "%REMOTE_JMX_OPTS%"=="" set
"START_OPTS=%START_OPTS% %REMOTE_JMX_OPTS%"
IF NOT "%SOLR_ADDL_ARGS%"=="" set "START_OPTS=%START_OPTS% %SOLR_ADDL_ARGS%"
IF NOT "%SOLR_HOST_ARG%"=="" set "START_OPTS=%START_OPTS% %SOLR_HOST_ARG%"
IF NOT "%SOLR_OPTS%"=="" set "START_OPTS=%START_OPTS% %SOLR_OPTS%"
+IF NOT "%SOLR_OPTS_INTERNAL%"=="" set "START_OPTS=%START_OPTS%
%SOLR_OPTS_INTERNAL%"
IF NOT "!SECURITY_MANAGER_OPTS!"=="" set "START_OPTS=%START_OPTS%
!SECURITY_MANAGER_OPTS!"
IF "%SOLR_SSL_ENABLED%"=="true" (
set "SSL_PORT_PROP=-Dsolr.jetty.https.port=%SOLR_PORT%"