lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shawn Heisey (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-8889) SolrCloud deleteById is broken when router.field is set
Date Thu, 24 May 2018 04:40:00 GMT

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

Shawn Heisey commented on SOLR-8889:
------------------------------------

[~jsp08], I've been following your thread on the mailing list.  Using deleteByQuery runs the
risk of big pauses when merges happen, but I think it might avoid the problems described on
this issue.

SOLR-5890 seems to say that if you explicitly send a deleteById request to a core that's a
replica of the correct shard, rather than sending it to the collection, and if all IDs in
the delete are on that shard, deleteById might work.  (For SolrJ, that would require using
HttpSolrClient rather than CloudSolrClient)

The actual change for SOLR-5890 looks promising (using the \_route\_ parameter), but then
SOLR-7384 appears to indicate that it doesn't actually work correctly.

More than one of the issues touching on this problem has mentioned broadcasting the delete
to all shards as a workaround or a solution, but it seems that this hasn't actually been implemented.
 One idea, which I admit is a drastic notion, is to implement a parameter that would force
deleteById on SolrCloud to send the delete to all shards.

> SolrCloud deleteById is broken when router.field is set
> -------------------------------------------------------
>
>                 Key: SOLR-8889
>                 URL: https://issues.apache.org/jira/browse/SOLR-8889
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud, SolrJ
>            Reporter: David Smiley
>            Priority: Major
>         Attachments: SOLR_8889_investigation.patch
>
>
> If you set router.field on your collection to shard by something other than the ID, then
deleting documents by ID fails some of the time (how much depends on how sharded the collection
is).  I suspect that it'd work if the IDs provided when deleting by ID were prefixed using
the composite key syntax -- "routekey!id" though I didn't check.  This is terrible.  Internally
Solr should broadcast to all the shards if there is no composite key prefix.
> Some affected code is UpdateRequest.getRoutes.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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


Mime
View raw message