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

SimUtils incorrectly converts v2 to v1 request params

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.3
    • Fix Version/s: 8.5
    • Component/s: None
    • Labels:
      None

      Description

      As reported by Li Cao on the mailing list:

      I am using solr 8.3.0 in cloud mode. I have collection level autoscaling policy and the collection name is “entity”. But when I run autoscaling simulation all the steps failed with this message:

            "error":{
              "exception":"java.io.IOException: java.util.concurrent.ExecutionException: org.apache.solr.common.SolrException: org.apache.solr.common.SolrException: Could not find collection : entity/shards",
              "suggestion":{
                "type":"repair",
                "operation":{
                  "method":"POST",
                  "path":"/c/entity/shards",
                  "command":{"add-replica":{
                      "shard":"shard2",
                      "node":"my_node:8983_solr",
                      "type":"TLOG"}}}},
              "replicaInfo":null}}},

      The simulation package internally uses v1 APIs but the requests created by the autoscaling framework may use v2 APIs. The utility class SimUtils converts v2 request parameters to v1 parameters, without actually using the apispec or v2 Api handlers (as that would mean adding more complexity to the simulator, and only tangentially related to the autoscaling).

      There's a bug in this utility when converting the path of the request - V2 apispec uses /c/{collection}/shards when manipulating shards and replicas - unlike V1 which uniformly uses /collections. The utility class doesn't account for this path difference and creates invalid collection names.

        Attachments

          Activity

            People

            • Assignee:
              ab Andrzej Bialecki
              Reporter:
              ab Andrzej Bialecki
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: