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

Async INSTALLSHARDDATA requests never report failure

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 9.4
    • main (10.0), 9.5
    • None
    • None

    Description

      When run synchronously, INSTALLSHARDDATA failures are reported reasonably back to users.

      $ curl -ilk -X GET 'http://localhost:8983/solr/admin/collections?action=INSTALLSHARDDATA&collection=colltoinstall&shard=shard1&location=$path'
      HTTP/1.1 500 Server Error
      Content-Type: application/json;charset=utf-8
      Content-Length: 5443
      
      {
        "responseHeader":{
          "status":500,
          "QTime":227
        },
        "error":{
          "metadata":["error-class","org.apache.solr.common.SolrException","root-error-class","org.apache.solr.common.SolrException"],
          "msg":"Could not install data to collection [colltoinstall] and shard [shard1]",
          "trace":"org.apache.solr.common.SolrException: Could not install data to collection [colltoinstall] and shard [shard1]\n\tat org.apache.solr.client.solrj.SolrResponse.getException(SolrResponse.java:56)\n\tat org.apache.solr.handler.admin.api.InstallShardData.installShardData(InstallShardData.java:99)\n\tat
      <...snip...>
      org.apache.solr.servlet.SolrDispatchFilter.dispatch(SolrDispatchFilter.java:254)\n\tat \tat java.base/java.lang.Thread.run(Thread.java:833)\n",
          "code":500
        }
      

      But when run asynchronously, the response is classified as "completed" instead of "failed" for some reason.

      $ curl -ilk -X GET 'http://localhost:8983/solr/admin/collections?action=INSTALLSHARDDATA&collection=colltoinstall&shard=shard1&location=$path&async=$asyncId'
      HTTP/1.1 200 OK
      Content-Type: application/json;charset=utf-8
      Vary: Accept-Encoding
      Content-Length: 59
      
      {
        "responseHeader":{
          "status":0,
          "QTime":74
        }
      }
      
      $ curl -ilk -X GET 'http://localhost:8983/solr/admin/collections?action=REQUESTSTATUS&requestid=$asyncId'
      HTTP/1.1 200 OK
      Content-Type: application/json;charset=utf-8
      Vary: Accept-Encoding
      Content-Length: 149
      
      {
        "responseHeader":{
          "status":0,
          "QTime":1
        },
        "status":{
          "state":"completed",
          "msg":"found [1A5B84E6] in completed tasks"
        }
      }
      

      Attachments

        1. reproduce.sh
          1 kB
          Jason Gerlowski

        Issue Links

          Activity

            People

              gerlowskija Jason Gerlowski
              gerlowskija Jason Gerlowski
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m