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

Bugs around createNodeSet=EMPTY

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Firstly, As of today we cannot create an empty collection from SolrJ

      I have a two node cluster and this API call fails with an error

          //Create a coreless collection of 3 shards
          CollectionAdminRequest.Create create = CollectionAdminRequest
              .createCollection("test_collection", "conf1", 3,   0)
              .setCreateNodeSet(OverseerCollectionMessageHandler.CREATE_NODE_SET_EMPTY)
              .setMaxShardsPerNode(-1);

      Secondly if I use the API directly , {{http://localhost:8983/solr/admin/collections?action=create&name=test_coll&numShards=5&createNodeSet=EMPTY }}the state.json has replicationFactor = nrtReplicas = 1 instead of 0

      "test_coll":{
          "pullReplicas":"0",
          "replicationFactor":"1",
          "router":{"name":"compositeId"},
          "maxShardsPerNode":"1",
          "autoAddReplicas":"false",
          "nrtReplicas":"1",
          "tlogReplicas":"0",
          "shards":{
            "shard1":{
              "range":"80000000-b332ffff",
              "state":"active",
              "replicas":{}},
            "shard2":{

      On a side note , I think we should rethink how replicationFactor/nrtReplicas/tlogReplicas/pullReplicas are stored.
      These values could be stored at a per shard level such that adding a replica will actually refelct the total replication count

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                varun Varun Thacker
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: