Jason Gerlowski created SOLR-17116:
--------------------------------------

             Summary: Async INSTALLSHARDDATA requests never report failure 
                 Key: SOLR-17116
                 URL: https://issues.apache.org/jira/browse/SOLR-17116
             Project: Solr
          Issue Type: Improvement
      Security Level: Public (Default Security Level. Issues are Public)
    Affects Versions: 9.4
            Reporter: Jason Gerlowski


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

{code}
$ 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
  }
{code}

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

{code}
$ 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"
  }
}
{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to