You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2026/04/05 12:46:00 UTC
[jira] [Commented] (SOLR-18114) CloudSolrClient fails deleteById with directUpdatesToLeadersOnly but no route passed
[ https://issues.apache.org/jira/browse/SOLR-18114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18071207#comment-18071207 ]
ASF subversion and git services commented on SOLR-18114:
--------------------------------------------------------
Commit 6d896e096f593c86d59b779ba0a9a866791440e0 in solr's branch refs/heads/jira/SOLR-17697-picocli from Matthew Biscocho
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=6d896e096f5 ]
[SOLR-18114] CloudSolrClient fails deleteById with directUpdatesToLeadersOnly but no route passed (#4219)
Fixed a bug where CloudSolrClient throws an exception when deleteById is sent a to collection that has router field configured and has directUpdatesToLeadersOnly=true but is sent without routing info. Also added a log.warn when request is sent but no routing info is passed causing request to be sent in the general unoptimized route.
> 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
> Labels: pull-request-available
> Fix For: 10.1, 9.11
>
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> 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: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org