Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-14630

CloudSolrClient doesn't pick correct core when server contains more shards

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 8.5.1, 8.5.2
    • None
    • SolrCloud, SolrJ
    • None

    Description

      Precondition: create collection with 4 shards on one server.

      During search and update, solr cloud client picks wrong core even route exists in query param. In BaseSolrClient class, method sendRequest, 

       

      sortedReplicas.forEach( replica -> {
        if (seenNodes.add(replica.getNodeName())) {
          theUrlList.add(ZkCoreNodeProps.getCoreUrl(replica.getBaseUrl(), joinedInputCollections));
        }
      });
      
      

       

      Previous part of code adds base url(localhost:8983/solr/collection_name) to theUrlList, it doesn't create core address(localhost:8983/solr/core_name). If we change previous code to:

      sortedReplicas.forEach(replica -> {
          if (seenNodes.add(replica.getNodeName())) {
              theUrlList.add(replica.getCoreUrl());
          }
      });

      Solr cloud client picks core which is defined with  route parameter.

       

        

      Attachments

        Activity

          People

            Unassigned Unassigned
            idjurasevic Ivan Djurasevic
            Votes:
            3 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated: