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: Closed
    • Major
    • Resolution: Fixed
    • 8.5.1, 8.5.2
    • 9.3
    • 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

        Issue Links

          Activity

            People

              dsmiley David Smiley
              idjurasevic Ivan Djurasevic
              Votes:
              1 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m