lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject lucene-solr:branch_7x: SOLR-12087: Check for exception message of request recovery to remove LIR node
Date Thu, 29 Mar 2018 11:39:23 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x 779171533 -> 751adad5b


SOLR-12087: Check for exception message of request recovery to remove LIR node


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/751adad5
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/751adad5
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/751adad5

Branch: refs/heads/branch_7x
Commit: 751adad5b16ba2cd343427556459427517a41aed
Parents: 7791715
Author: Cao Manh Dat <datcm@apache.org>
Authored: Thu Mar 29 18:38:07 2018 +0700
Committer: Cao Manh Dat <datcm@apache.org>
Committed: Thu Mar 29 18:39:10 2018 +0700

----------------------------------------------------------------------
 .../org/apache/solr/cloud/LeaderInitiatedRecoveryThread.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/751adad5/solr/core/src/java/org/apache/solr/cloud/LeaderInitiatedRecoveryThread.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/LeaderInitiatedRecoveryThread.java b/solr/core/src/java/org/apache/solr/cloud/LeaderInitiatedRecoveryThread.java
index 01c32e5..071bfbf 100644
--- a/solr/core/src/java/org/apache/solr/cloud/LeaderInitiatedRecoveryThread.java
+++ b/solr/core/src/java/org/apache/solr/cloud/LeaderInitiatedRecoveryThread.java
@@ -237,12 +237,12 @@ public class LeaderInitiatedRecoveryThread extends Thread {
             continueTrying = false;
           }
 
-          if (CloudUtil.replicaExists(zkController.getClusterState(), collection, shardId,
replicaCoreNodeName)) {
-            SolrException.log(log, recoveryUrl + ": Could not tell a replica to recover,
wasCommError:"+wasCommError, t);
-          } else {
+          if (rootCause.getMessage().contains("Unable to locate core")) {
             log.info("Replica {} is removed, hence remove its lir state", replicaCoreNodeName);
             removeLIRState(replicaCoreNodeName);
             break;
+          } else {
+            SolrException.log(log, recoveryUrl + ": Could not tell a replica to recover,
wasCommError:"+wasCommError, t);
           }
         }
       }


Mime
View raw message