lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject lucene-solr:master: SOLR-12146: LIR should skip deleted replicas
Date Tue, 27 Mar 2018 08:55:54 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/master b3cf209f6 -> 160faaf59


SOLR-12146: LIR should skip deleted replicas


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

Branch: refs/heads/master
Commit: 160faaf59484dd85e99f8f95012cb8c46c173fdd
Parents: b3cf209
Author: Cao Manh Dat <datcm@apache.org>
Authored: Tue Mar 27 15:55:43 2018 +0700
Committer: Cao Manh Dat <datcm@apache.org>
Committed: Tue Mar 27 15:55:43 2018 +0700

----------------------------------------------------------------------
 solr/CHANGES.txt                                           | 2 ++
 solr/core/src/java/org/apache/solr/cloud/ZkController.java | 8 ++++----
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/160faaf5/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 1d1a3ff..a963de8 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -96,6 +96,8 @@ Optimizations
 * SOLR-11891: DocStreamer now respects the ReturnFields when populating a SolrDocument, reducing
the
   number of unneccessary fields a ResponseWriter will see if documentCache is used (wei wang,
hossman)
 
+* SOLR-12146: LIR should skip deleted replicas (Cao Manh Dat)
+
 Other Changes
 ----------------------
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/160faaf5/solr/core/src/java/org/apache/solr/cloud/ZkController.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/ZkController.java b/solr/core/src/java/org/apache/solr/cloud/ZkController.java
index 477e567..c0ddd26 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ZkController.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ZkController.java
@@ -2175,7 +2175,8 @@ public class ZkController {
       }
 
       // we only really need to try to start the LIR process if the node itself is "live"
-      if (getZkStateReader().getClusterState().liveNodesContain(replicaNodeName)) {
+      if (getZkStateReader().getClusterState().liveNodesContain(replicaNodeName)
+          && CloudUtil.replicaExists(getZkStateReader().getClusterState(), collection,
shardId, replicaCoreNodeName)) {
 
         LeaderInitiatedRecoveryThread lirThread =
             new LeaderInitiatedRecoveryThread(this,
@@ -2200,9 +2201,8 @@ public class ZkController {
             replicaNodeName + " into leader-initiated recovery.", replicaCoreProps.getCoreName(),
replicaCoreNodeName);
       } else {
         nodeIsLive = false; // we really don't need to send the recovery request if the node
is NOT live
-        log.info("Node " + replicaNodeName +
-                " is not live, so skipping leader-initiated recovery for replica: core={}
coreNodeName={}",
-            replicaCoreProps.getCoreName(), replicaCoreNodeName);
+        log.info("Node {} is not live or replica {} is deleted, so skipping leader-initiated
recovery for replica: core={}",
+            replicaNodeName, replicaCoreNodeName, replicaCoreProps.getCoreName());
         // publishDownState will be false to avoid publishing the "down" state too many times
         // as many errors can occur together and will each call into this method (SOLR-6189)
       }


Mime
View raw message