You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2020/09/07 21:09:24 UTC

[lucene-solr] branch reference_impl_dev updated: @784 Don't check for leader here.

This is an automated email from the ASF dual-hosted git repository.

markrmiller pushed a commit to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/reference_impl_dev by this push:
     new c04ee1f  @784 Don't check for leader here.
c04ee1f is described below

commit c04ee1f43fac1f8fe9a98c9d339e6770dbe6f904
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Mon Sep 7 16:08:31 2020 -0500

    @784 Don't check for leader here.
---
 .../src/java/org/apache/solr/cloud/api/collections/AddReplicaCmd.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/solr/core/src/java/org/apache/solr/cloud/api/collections/AddReplicaCmd.java b/solr/core/src/java/org/apache/solr/cloud/api/collections/AddReplicaCmd.java
index 0d3d3df..5dc9841 100644
--- a/solr/core/src/java/org/apache/solr/cloud/api/collections/AddReplicaCmd.java
+++ b/solr/core/src/java/org/apache/solr/cloud/api/collections/AddReplicaCmd.java
@@ -221,11 +221,9 @@ public class AddReplicaCmd implements OverseerCollectionMessageHandler.Cmd {
             if (collectionState == null) {
               return false;
             }
-            Slice slice = collectionState.getSlice(shard);
-            if (slice == null || slice.getLeader() == null) {
+            if (collectionState.getSlices() == null) {
               return false;
             }
-
             List<Replica> replicas = collectionState.getReplicas();
             int found = 0;
             for (String name : coreNodeNames) {