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/11/11 01:52:12 UTC
[lucene-solr] branch reference_impl_dev updated: @1157 Check leader
active as well in create collection cmd.
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 399f666 @1157 Check leader active as well in create collection cmd.
399f666 is described below
commit 399f666088013bacf3e269169ae3bb1d5e98da0b
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Tue Nov 10 19:47:19 2020 -0600
@1157 Check leader active as well in create collection cmd.
---
.../java/org/apache/solr/cloud/api/collections/CreateCollectionCmd.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/solr/core/src/java/org/apache/solr/cloud/api/collections/CreateCollectionCmd.java b/solr/core/src/java/org/apache/solr/cloud/api/collections/CreateCollectionCmd.java
index 6290cf4..9e29e30 100644
--- a/solr/core/src/java/org/apache/solr/cloud/api/collections/CreateCollectionCmd.java
+++ b/solr/core/src/java/org/apache/solr/cloud/api/collections/CreateCollectionCmd.java
@@ -351,7 +351,7 @@ public class CreateCollectionCmd implements OverseerCollectionMessageHandler.Cmd
return false;
}
for (Slice slice : slices) {
- if (slice.getLeader() == null) {
+ if (slice.getLeader() == null || slice.getLeader().getState() != Replica.State.ACTIVE) {
return false;
}
}