You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Ivan Djurasevic (Jira)" <ji...@apache.org> on 2020/08/07 08:47:00 UTC

[jira] [Commented] (SOLR-14630) CloudSolrClient doesn't pick correct core when server contains more shards

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

Ivan Djurasevic commented on SOLR-14630:
----------------------------------------

[~cpoerschke] I'm sorry for late response. *First, i want to say that search and update are working, there are no problems with that operations.*

Update and search are working because request is forwarded to correct shard from wrong shard.   

Main problems are overhead forwarding requests and loosing parameters from update parameters during forwarding requests. When we perform batch update we send some parameters(for example language code) in update request parameters, after that in update request processor chain we use that parameters(language code) and with them we create field names(SOURCE_EN_STORE, SOURCE_EN_NGRAM, SOURCE_EN_FUZZY, ...).

To be more precise, client(application) creates documents with field (SOURCE=text), and set language English (en) in update request. In update request processor chain with SOURCE field and locale code from update request parameters we create new fields(SOURCE_EN_STORE, SOURCE_EN_NGRAM, SOURCE_EN_FUZZY, ...) .

If you need more information, please let me know. 

> 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
>
> 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.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org