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-12146: LIR should skip deleted replicas
Date Tue, 27 Mar 2018 08:57:03 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x 9b4d16963 -> 0ae7c0e03


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/0ae7c0e0
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/0ae7c0e0
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/0ae7c0e0

Branch: refs/heads/branch_7x
Commit: 0ae7c0e031b694966eb43b46a76317d3e8dc91f8
Parents: 9b4d169
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:56:45 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/0ae7c0e0/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index da95c08..7f2b37f 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -76,6 +76,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/0ae7c0e0/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