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);