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

AutoAddReplicas feature has bug that local coreproperties file was deleted by mistake

    XMLWordPrintableJSON

    Details

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

      Description

      when A solr instance crash,B solr instance take over A's core failed .B solr instance cant to create coreproperties file.
      The same time A solr instance startup ,remove local corePropertiesLocator,for the solr cluster, the coreproperties file is missing.

      B solr instance TEST_shard2_replica1 log:

      2016-03-23 10:09:48,683 INFO org.apache.solr.handler.admin.CoreAdminHandler: core create command coreNodeName=core_node4&name=TEST_shard2_replica1&action=CREATE&collection=TEST&dataDir=hdfs://LV//solr/TEST/core_node4/data/&ulogDir=hdfs://LV/solr/TEST/core_node4/data/tlog/tlog/tlog&wt=javabin&version=2
      ..
      ..
      2016-03-23 10:11:18,993 ERROR org.apache.solr.core.SolrCore: org.apache.solr.common.SolrException: Error CREATEing SolrCore 'TEST_shard2_replica1': Unable to create core [TEST_shard2_replica1] Caused by: KeeperErrorCode = Session expired for /configs/TEST/solrconfig.xml
      
      

      A solr instance TEST_shard2_replica1 log:

      2016-03-23 10:11:53,873 INFO org.apache.solr.core.CoresLocator: Looking for core definitions underneath /var/lib/solr
      2016-03-23 10:11:53,884 INFO org.apache.solr.core.CoresLocator: Found core TEST_shard2_replica1 in /var/lib/solr/TEST_shard2_replica1/
      2016-03-23 10:11:53,885 INFO org.apache.solr.core.CoresLocator: Found 1 core definitions
      2016-03-23 10:11:53,904 ERROR org.apache.solr.cloud.CloudUtil:
      org.apache.solr.common.SolrException: Will not load SolrCore TEST_shard2_replica1 because it has been replaced due to failover.
              at org.apache.solr.cloud.CloudUtil.checkSharedFSFailoverReplaced(CloudUtil.java:77)
              at org.apache.solr.cloud.ZkController.throwErrorIfReplicaReplaced(ZkController.java:2031)
              at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:258)
              at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:254)
              at java.util.concurrent.FutureTask.run(FutureTask.java:262)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              at java.lang.Thread.run(Thread.java:745)
      
      CoreAdminHandler.java
            SolrCore core = coreContainer.create(dcore);//throw Exception ,coreproperties create failed
            
            // only write out the descriptor if the core is successfully created
            coreContainer.getCoresLocator().create(coreContainer, dcore);
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              lvchuanwen lvchuanwen
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: