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

Config API returns status 0 for failed operations

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 7.5, 8.0
    • None
    • None

    Description

      bin/solr config depends on the status from Config API calls to determine whether the operation succeeded, but apparently the Config API can return status 0 for failed operations. As a result, bin/solr config will claim success. For example, after running bin/solr start -c and bin/solr create -c mycoll:

      $PROMPT$ bin/solr config -c mycoll -z localhost:9983 -property FOOBAR -value BAZ
      [...]
      POSTing request to Config API: http://192.168.1.12:8983/solr/mycoll/config
      {"set-property":{"FOOBAR":"BAZ"}}
      Successfully set-property FOOBAR to BAZ
      

      But the FOOBAR property cannot be set via set-property, because it is not on the editable properties whitelist in EditableSolrConfigAttributes.json.

      This is evident from the direct Config API call:

      PROMPT$ curl -X POST -d '{set-property:{FOOBAR:BAZ}}'
      {
        "responseHeader":{
          "status":0,
          "QTime":1},
        "errorMessages":[{
            "set-property":{"FOOBAR":"BAZ"},
            "errorMessages":["'FOOBAR' is not an editable property"]}],
        "WARNING":"This response format is experimental.  It is likely to change in the future."}
      

      Attachments

        1. SOLR-12482.patch
          7 kB
          Steven Rowe

        Issue Links

          Activity

            People

              sarowe Steven Rowe
              sarowe Steven Rowe
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: