Mathieu Marie created SOLR-16770:
------------------------------------
Summary: It should be possible to provide java params with -XX the
same way it is possible with -D
Key: SOLR-16770
URL: https://issues.apache.org/jira/browse/SOLR-16770
Project: Solr
Issue Type: Improvement
Security Level: Public (Default Security Level. Issues are Public)
Components: SolrCLI
Affects Versions: 8.6.2
Reporter: Mathieu Marie
I want to be able to start solr with JFR and provide the JFR args through the
CLI.
Those java parameters are of the form -XX:FlightRecorderOptions=stackdepth=128.
However when I provide those parameters, I get the following error message:
{{ERROR: -XX:FlightRecorderOptions=stackdepth=128 is not supported by this
script}}
{{}}
This is due to the check in solr
[script|https://github.com/apache/solr/blob/main/solr/bin/solr#L1793]:
{{ if [ -z "${1:-}" ]; then}}
{{ break # out-of-args, stop looping}}
{{ elif [ "${1:0:2}" == "-D" ]; then}}
{{ # pass thru any opts that begin with -D (java system props)}}
{{ SOLR_OPTS+=("$1")}}
{{ PASS_TO_RUN_EXAMPLE+=("$1")}}
{{ shift}}
{{ else}}
{{ print_usage "$SCRIPT_CMD" "$1 is not supported by this script"}}
{{ exit 1}}
{{ fi}}
The line
{{elif [ "${1:0:2}" == "-D" ]; then}}
should be replaced by
{{elif [ "${1:0:2}" == "-D" -o "${1:0:3}" == "-XX" ]; then}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]