Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-16770

It should be possible to provide java params with -XX the same way it is possible with -D

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Not A Bug
    • 8.6.2
    • None
    • SolrCLI
    • None

    Description

      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

          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

      Attachments

        Activity

          People

            Unassigned Unassigned
            matmarie Mathieu Marie
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: