[ 
https://issues.apache.org/jira/browse/SOLR-14630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17723170#comment-17723170
 ] 

Pierre Salagnac commented on SOLR-14630:
----------------------------------------

I also hit this now pretty old bug.

After an offline discussion with [~dsmiley], we came to the conclusion that the 
description of this bug and the proposed solution are mostly correct. I'm 
working on a patch that gets back to the old behavior (using 
{{{}coreNodeProps.getCoreUrl(){}}}), but only when the query scope is a single 
collection.

When querying multiple collection, we anyway can't avoid one more forwarded 
request, so I plan to keeping the current behavior in this case.

> CloudSolrClient doesn't pick correct core when server contains more shards
> --------------------------------------------------------------------------
>
>                 Key: SOLR-14630
>                 URL: https://issues.apache.org/jira/browse/SOLR-14630
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud, SolrJ
>    Affects Versions: 8.5.1, 8.5.2
>            Reporter: Ivan Djurasevic
>            Priority: Major
>         Attachments: 
> 0001-SOLR-14630-Test-case-demonstrating-_route_-is-broken.patch
>
>
> 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, 
>  
> {code:java}
> sortedReplicas.forEach( replica -> {
>   if (seenNodes.add(replica.getNodeName())) {
>     theUrlList.add(ZkCoreNodeProps.getCoreUrl(replica.getBaseUrl(), 
> joinedInputCollections));
>   }
> });
> {code}
>  
> 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:
> {quote}
> {code:java}
> sortedReplicas.forEach(replica -> {
>     if (seenNodes.add(replica.getNodeName())) {
>         theUrlList.add(replica.getCoreUrl());
>     }
> });{code}
> {quote}
> Solr cloud client picks core which is defined with  _route_ parameter.
>  
>   



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to