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

First collection created with stateFormat=2 results in a weird /clusterstate.json

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0, 5.1, 6.0
    • Component/s: SolrCloud
    • Labels:
      None

      Description

      With the 5.0 branch, when I do:

      bin/solr -c && bin/solr create -c foo
      

      The /clusterstate.json in ZK has and invalid definition of the foo collection

      {"foo":{
          "replicationFactor":"1",
          "router":{"name":"compositeId"},
          "maxShardsPerNode":"1",
          "autoAddReplicas":"false",
          "shards":{"shard1":{
              "range":"80000000-7fffffff",
              "state":"active",
              "replicas":{}}}}}
      

      To verify this isn't the UI sending back the wrong data, I went into the zkCli.sh command-line and got:

      [zk: localhost:9983(CONNECTED) 2] get /clusterstate.json
      {"foo":{
          "replicationFactor":"1",
          "router":{"name":"compositeId"},
          "maxShardsPerNode":"1",
          "autoAddReplicas":"false",
          "shards":{"shard1":{
              "range":"80000000-7fffffff",
              "state":"active",
              "replicas":{}}}}}
      cZxid = 0x20
      ctime = Mon Jan 26 14:56:44 MST 2015
      mZxid = 0x65
      mtime = Mon Jan 26 14:57:16 MST 2015
      pZxid = 0x20
      cversion = 0
      dataVersion = 1
      aclVersion = 0
      ephemeralOwner = 0x0
      dataLength = 247
      numChildren = 0
      

      The /collections/foo/state.json looks correct:

      {"foo":{
          "replicationFactor":"1",
          "router":{"name":"compositeId"},
          "maxShardsPerNode":"1",
          "autoAddReplicas":"false",
          "shards":{"shard1":{
              "range":"80000000-7fffffff",
              "state":"active",
              "replicas":{"core_node1":{
                  "core":"foo_shard1_replica1",
                  "base_url":"http://192.168.1.2:8983/solr",
                  "node_name":"192.168.1.2:8983_solr",
                  "state":"active",
                  "leader":"true"}}}}}}
      

      Here's the weird thing ... If I create a second collection using the same script, all is well and /clusterstate.json is empty

      bin/solr create -c foo2
      

      Calling this a blocker because 5.0 can't be released with this happening.

        Attachments

        1. SOLR-7039.patch
          5 kB
          Noble Paul

          Activity

            People

            • Assignee:
              noble.paul Noble Paul
              Reporter:
              thelabdude Timothy Potter
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: