[ https://issues.apache.org/jira/browse/SOLR-14630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17175518#comment-17175518 ]
Ivan Djurasevic commented on SOLR-14630: ---------------------------------------- {quote}When you say "batch update", do you mean more than one document in the same request or perhaps something else? If the batch size was one then does the issue happen also, I wonder? {quote} Batch size is not problem. Same issue is happening when batch contains 50 and when contains 1 document. {quote}I'm not very familiar with update request processor chains but the [https://lucene.apache.org/solr/guide/8_6/update-request-processors.html#update-processors-in-solrcloud] documentation was useful and the SOLR-8030 ticket mentioned in it sounds interesting. {quote} Update processor chain is not problem(they have some other issues, i will raise bugs for that team, too), i was describing our process and why is important to hit correct shard without forwarding requests. {quote}What if {{inputCollections}} contained more than one element? {quote} Yes, this is a problem, i was trying to search across collections and with my fix, it doesn't work. It seems that HttpSolrCall class can't parse URL when URL contain more core names. {quote}What if {{inputCollections}} contained an alias that was resolved at [line 1080|https://github.com/apache/lucene-solr/blob/releases/lucene-solr/8.5.2/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java#L1080], does it matter that before the alias (e.g. {{collection_one}}) was appended but now a core name (e.g. {{collection1_shard2_replica1}}) is appended? {quote} Aliases should't be a problem, when we solve issue with multiple collections(because we found real collection names before creating URL). Unfortunately, to fix this issue we will need to refactor HttpSolrCall class, too. > 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.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org