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

SPLITSHARD creates shards "...Ignoring commit while not ACTIVE"


    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 4.6.1
    • Fix Version/s: 4.7, 6.0
    • Component/s: SolrCloud
    • Labels:
    • Environment:

      Windows 7 64 bit, Debian 3.11.1


      I've tried to use the SPLITSHARD command from the Solr collection-Api.
      A JUnit test successfully runs before the split, but fails after splitting the shard, stopping and restarting Solr. It won't fail if Solr isn't restarted after splitting.

      I found some entries in files "solr.log" and "core.properties" which may give hints.

      After split:

      org.apache.solr.update.UpdateLog; Starting to buffer updates. FSUpdateLog{state=ACTIVE, tlog=null
      is logged for both newly created shards in "solr.log"

      "clusterstate.json" from Solr Cloud admin page shows:
      shard1 state: inactive (replica: active)
      shard1_0 state: active parent shard1 (replica active)
      shard1_1 state: active parent shard1 (replica active)

      Both "core.properties" files of the newly created shards have
      shardState=construction and shardParent=shard1
      The "core.properties" file of the parent shard is not changed.

      When restarting Solr

      and running the JUnit again these entries are logged:
      org.apache.solr.update.processor.DistributedUpdateProcessor; Ignoring commit while not ACTIVE - state: BUFFERING replay:0
      in "solr.log"

      I mainly I followed the steps of this tutorial http://architects.dzone.com/articles/solr-43-shard-splitting-quick.

      1. (install solr-4.6.1)
      2. create a small cluster:
        java -Dbootstrap_confdir=./solr/portalse/conf -Dcollection.configName=portalse -DzkRun -DnumShards=1 -DmaxShardsPerNode=2 -DreplicationFactor=1 -jar start.jar
      3. Run the unit test (after termination only one document exists).
      4. Split the only shard:
        curl 'http://localhost:8983/solr/admin/collections?action=SPLITSHARD&collection=portalse&shard=shard1'
        shard "collection1_shard1_0_replica1" created (1 document)
        shard "collection1_shard1_1_replica1" created (0 documents)
      5. commit index:
        curl 'http://localhost:8983/solr/portalse/update' --data-binary '<commit/>' -H 'Content-type:application/xml'
      6. stop Solr by pressing Ctl-C.
      7. restart Solr:
        java -DzkRun -jar start.jar
      8. Run the unit test from step 2 again.


        1. SOLR-5739-fix.patch
          7 kB
          Shalin Shekhar Mangar
        2. SOLR-5739.patch
          4 kB
          Shalin Shekhar Mangar



            • Assignee:
              shalinmangar Shalin Shekhar Mangar
              grumi Günther Ruck
            • Votes:
              0 Vote for this issue
              3 Start watching this issue


              • Created: