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

Matthew Biscocho commented on SOLR-18114:
-----------------------------------------

{quote}

What you propose here is that CSC detect deleteById is used without sufficient 
routing information in this circumstance ({{{}router.field{}}} is set), and 
thus we should fail (yet we aren't). 

{quote}



Correct. So we just need to check that the routing information on deleteById 
map has sufficient routing information like documents maps does. CSC will just 
fall down the general case for documents to all shards as its routing 
information is checked in the method unlike the deleteByIds.

When hasInfoToFindLeaders==false, it sends to all shards  like normal so this 
is not an issue.

 

> CloudSolrClient fails deleteById with directUpdatesToLeadersOnly but no route 
> passed
> ------------------------------------------------------------------------------------
>
>                 Key: SOLR-18114
>                 URL: https://issues.apache.org/jira/browse/SOLR-18114
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrJ
>            Reporter: Matthew Biscocho
>            Priority: Major
>
> CloudSolrClient will fail with the error "directUpdatesToLeadersOnly==true 
> but could not find leader(s)" when a collections has router.name=compositeId 
> and router.field configured and CloudSolrClient has 
> sendDirectUpdatesToShardLeadersOnly= true. 
>  
> [This 
> method|https://github.com/apache/solr/blob/a330e81bd58338ffe464ff058bb67c4bf32e2d00/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java#L1812]
>  does not check if the deleteById map has routing info when it doesn't and so 
> this method return true thinking that the info does exist. So when 
> directUpdatesToLeadersOnly=true, this causes the SERVICE_UNAVAILABLE 
> exception. The deleteById should fallback on the general unoptimized path to 
> complete the deleteById request instead of failing at the client side 
> outright.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to