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

v2 DELETEREPLICA not working

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 9.3
    • 9.4
    • v2 API
    • None

    Description

      Was checking if we could move on to use the new v2 API for all the API calls that we use currently and it seems like the delete replica command by replica name (deleting 1 replica only) is not working, not sure if this is a known issue as v2 is still a WIP, but logging it here anyway.

       

      Output from a local test cluster running with docker in solrcloud mode:

       

      docker_tests git:(chore/version_9_3_0) ✗ curl -X DELETE http://localhost:8983/api/collections/collection1/shards/shard1/replicas/core_node5 -v
      *   Trying 127.0.0.1:8983...
      * Connected to localhost (127.0.0.1) port 8983 (#0)
      > DELETE /api/collections/collection1/shards/shard1/replicas/core_node5 HTTP/1.1
      > Host: localhost:8983
      > User-Agent: curl/8.1.2
      > Accept: */*
      > 
      < HTTP/1.1 404 Not Found
      < Content-Type: application/json
      < Transfer-Encoding: chunked
      < 
      * Connection #0 to host localhost left intact
      {"responseHeader":{"status":404,"QTime":8},"error":{"metadata":{"error-class":"org.apache.solr.common.SolrException","root-error-class":"org.apache.solr.common.SolrException"},"msg":"Cannot find API for the path: /collections/collection1/shards/shard1/replicas/core_node5","code":404}}% 

      Same command using old API works fine:

       

      docker_tests git:(chore/version_9_3_0) ✗ curl -v "http://localhost:8983/solr/admin/collections?action=DELETEREPLICA&collection=collection1&shard=shard1&replica=core_node5"
      *   Trying 127.0.0.1:8983...
      * Connected to localhost (127.0.0.1) port 8983 (#0)
      > GET /solr/admin/collections?action=DELETEREPLICA&collection=collection1&shard=shard1&replica=core_node5 HTTP/1.1
      > Host: localhost:8983
      > User-Agent: curl/8.1.2
      > Accept: */*
      > 
      < HTTP/1.1 200 OK
      < Content-Security-Policy: default-src 'none'; base-uri 'none'; connect-src 'self'; form-action 'self'; font-src 'self'; frame-ancestors 'none'; img-src 'self' data:; media-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self'; worker-src 'self';
      < X-Content-Type-Options: nosniff
      < X-Frame-Options: SAMEORIGIN
      < X-XSS-Protection: 1; mode=block
      < Content-Type: application/json;charset=utf-8
      < Vary: Accept-Encoding
      < Content-Length: 186
      < 
      {
        "responseHeader":{
          "status":0,
          "QTime":223
        },
        "success":{
          "172.24.0.6:8983_solr":{
            "responseHeader":{
              "status":0,
              "QTime":65
            }
          }
        }
      * Connection #0 to host localhost left intact
      }%                                            

      Let me know if you need any more info.

       

      Thanks!

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jbcorreia Joao Correia
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: