From 8d64ac3a90cf2254427431475f63fdfdab69b989 Mon Sep 17 00:00:00 2001 From: Shalin Shekhar Mangar Date: Thu, 13 Mar 2014 16:30:18 +0000 Subject: [PATCH] SOLR-5861: Recovery should not set onlyIfLeaderActive=true for slice in 'recovery' state git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1577228 13f79535-47bb-0310-9956-ffa450edef68 --- solr/CHANGES.txt | 3 +++ solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index a3cbd32a89a..09a9c8eaaa2 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -163,6 +163,9 @@ Bug Fixes * SOLR-5800: Admin UI - Analysis form doesn't render results correctly when a CharFilter is used. (steffkes) +* SOLR-5861: Recovery should not set onlyIfLeaderActive=true for slice in 'recovery' + state. (shalin) + Optimizations ---------------------- * SOLR-1880: Distributed Search skips GET_FIELDS stage if EXECUTE_QUERY diff --git a/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java b/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java index cbff15e506b..0f62aaded36 100644 --- a/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java +++ b/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java @@ -218,7 +218,7 @@ public class RecoveryStrategy extends Thread implements ClosableThread { prepCmd.setState(ZkStateReader.RECOVERING); prepCmd.setCheckLive(true); prepCmd.setOnlyIfLeader(true); - if (!Slice.CONSTRUCTION.equals(slice.getState())) { + if (!Slice.CONSTRUCTION.equals(slice.getState()) && !Slice.RECOVERY.equals(slice.getState())) { prepCmd.setOnlyIfLeaderActive(true); } server.request(prepCmd);