You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by no...@apache.org on 2023/07/19 06:03:56 UTC

[solr] 02/02: Revert "Avoid creating a replica as a part of collection creation"

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

noble pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git

commit 94535340ceffe957d3be016de0a276b7710c7c8c
Author: Noble Paul <no...@gmail.com>
AuthorDate: Wed Jul 19 16:03:32 2023 +1000

    Revert "Avoid creating a replica as a part of collection creation"
    
    This reverts commit cced49608dc29f8bd0be4942244fdd60d34e9474.
    
    wrong branch
---
 .../core/src/java/org/apache/solr/servlet/CoordinatorHttpSolrCall.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/solr/core/src/java/org/apache/solr/servlet/CoordinatorHttpSolrCall.java b/solr/core/src/java/org/apache/solr/servlet/CoordinatorHttpSolrCall.java
index 9380b9835fa..cef7270d943 100644
--- a/solr/core/src/java/org/apache/solr/servlet/CoordinatorHttpSolrCall.java
+++ b/solr/core/src/java/org/apache/solr/servlet/CoordinatorHttpSolrCall.java
@@ -250,7 +250,8 @@ public class CoordinatorHttpSolrCall extends HttpSolrCall {
     SolrQueryResponse rsp = new SolrQueryResponse();
     try {
       CollectionAdminRequest.Create collCreationRequest =
-          CollectionAdminRequest.createCollection(syntheticCollectionName, confName, 1,0);
+          CollectionAdminRequest.createCollection(syntheticCollectionName, confName, 1, 1)
+              .setCreateNodeSet(cores.getZkController().getNodeName());
       collCreationRequest.setWaitForFinalState(true);
       SolrParams params = collCreationRequest.getParams();
       if (log.isInfoEnabled()) {