From commits-return-100484-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Thu Apr 19 10:04:40 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id A4FBC180638 for ; Thu, 19 Apr 2018 10:04:39 +0200 (CEST) Received: (qmail 70281 invoked by uid 500); 19 Apr 2018 08:04:09 -0000 Mailing-List: contact commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list commits@lucene.apache.org Received: (qmail 70271 invoked by uid 99); 19 Apr 2018 08:04:08 -0000 Received: from Unknown (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Apr 2018 08:04:08 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D5B8CDFA1F; Thu, 19 Apr 2018 08:03:52 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: datcm@apache.org To: commits@lucene.apache.org Message-Id: <105d6bb957d14f2a98d5507840ba309f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: lucene-solr:branch_7_3: SOLR-12146: LIR should skip deleted replicas Date: Thu, 19 Apr 2018 08:03:52 +0000 (UTC) Repository: lucene-solr Updated Branches: refs/heads/branch_7_3 ec9ccb5cd -> fc5555590 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/fc555559 Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/fc555559 Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/fc555559 Branch: refs/heads/branch_7_3 Commit: fc5555590f01c418cb2c6b52ad9c3b4dd84a31cd Parents: ec9ccb5 Author: Cao Manh Dat Authored: Tue Mar 27 15:55:43 2018 +0700 Committer: Cao Manh Dat Committed: Thu Apr 19 15:03:35 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/fc555559/solr/CHANGES.txt ---------------------------------------------------------------------- diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index c7e86cc..6a724ab 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -36,6 +36,8 @@ Bug Fixes * SOLR-12087: Deleting replicas sometimes fails and causes the replicas to exist in the down state (Cao Manh Dat) +* SOLR-12146: LIR should skip deleted replicas (Cao Manh Dat) + ================== 7.3.0 ================== Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release. http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/fc555559/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 7d3d526..5bd7381 100644 --- a/solr/core/src/java/org/apache/solr/cloud/ZkController.java +++ b/solr/core/src/java/org/apache/solr/cloud/ZkController.java @@ -2174,7 +2174,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, @@ -2199,9 +2200,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) }